docker-nginx-http2
docker-nginx-http2 copied to clipboard
Purging apt in a separate layer only bloats the image
https://github.com/Ehekatl/docker-nginx-http2/blob/master/Dockerfile#L45
Purging apt in a separate layer only bloats the image instead of reducing size, as the previous layer is saved in its entirety, and then the next layer has to apply the diff, which is to remove files.
In addition you'll want to merge that layer with the apt-get layer so that you get build dependencies and clean them up in the same layer.