Ensure that package managers clean up

Every package manager should clean up after themselves in order to keep
docker layers neat and tiny:

apt (Debian/Ubuntu package manager):

 - unneeded dependencies are cleared (autoremove)
 - caches are cleaned (clean)
 - package lists are deleted

yum (CentOS package manager),
zypper (OpenSuse package manager)

 - should clear caches after installing dependencies

pip (Python package manager),
apk (Alpine package manager)

 - should use no cache for installing dependencies
This commit is contained in:
Lukas Eipert 2018-10-04 14:38:17 +02:00
parent 9fa4aa85c2
commit 5380948868
No known key found for this signature in database
GPG key ID: 148BEA37CB35B2AC
19 changed files with 62 additions and 27 deletions

View file

@ -1,9 +1,10 @@
FROM centos:centos7
RUN yum update -y -q
RUN yum groupinstall -y Development Tools
RUN yum install -y \
gcc gcc-c++ git make curl zlib-devel openssl-devel
RUN yum update -y -q \
&& yum groupinstall -y Development Tools \
&& yum install -y \
gcc gcc-c++ git make curl zlib-devel openssl-devel \
&& yum clean all
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8