Open tiagoapimenta opened 6 years ago
Feel free to open a PR with these improvements. If we use multistage build, we should add documentation about the docker version required to build.
Ok, I'm forking it, but in my opinion it should be as clean as possible, as I have stated on the other issue, so I will remove wget
and ca-certificates
as it seems it was only installed in order to download glibc
.
I understand it will not be possible to remove findutils
by now, but is it really necessary to have device-mapper
, zfs
, thin-provisioning-tools
and a custom /etc/nsswitch.conf
? Could you please explain me why?
https://github.com/google/cadvisor/blob/cf21050b5906cce83527f5c531f0cd7d279a3da3/deploy/Dockerfile#L10
Instead of downloading a binary out of nowhere it would be better to use native package libc6-compat:
As well as removing
wget
,certs
andfindutils
and other unnecessary tools after the download, or use nativewget
without https.Other tip would be use multistage-build: https://docs.docker.com/develop/develop-images/multistage-build/
So it wouldn't be necessary to remove
wget
andcerts
tools, it would just use another base container and copy the downloaded files from the first one.