docker-library / httpd

Docker Official Image packaging for Apache HTTP Server
https://httpd.apache.org
Apache License 2.0
310 stars 345 forks source link

added some more cleanup tweaks #156

Closed Rajpratik71 closed 4 years ago

Rajpratik71 commented 4 years ago

More cleanup tweaks using

  1. apt-get clean

  2. rm -rf /var/lib/apt/lists/ /tmp/ /var/tmp/*

removing downloaded packages and packages list will free up some space ,

results in smaller image size.

yosifkit commented 4 years ago

Same as https://github.com/docker-library/gcc/pull/64#issuecomment-593666277

$ docker run -it --rm httpd bash
Unable to find image 'httpd:latest' locally
latest: Pulling from library/httpd
68ced04f60ab: Pull complete 
35d35f1e0dc9: Pull complete 
8a918bf0ae55: Pull complete 
d7b9f2dbc195: Pull complete 
d56c468bde81: Pull complete 
Digest: sha256:946c54069130dbf136903fe658fe7d113bd8db8004de31282e20b262a3e106fb
Status: Downloaded newer image for httpd:latest
root@90a76b4060f8:/usr/local/apache2# ls -l /tmp/
total 0
root@90a76b4060f8:/usr/local/apache2# ls -l /var/tmp/
total 0