Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Docker's Second Death. Parent comment
the way to create small docker image is:
RUN apt-get install foo && \ do bar && \ do more && \ remove all of the crap you don't want
You can use multi-stage builds, but they are sort of hacky and do not match your thinking.
You can also use --squash but it is a hack too and usually is not available where needed because of experimental.
Also, ADD is stupid.
You can add a tar.gz file and it will expand it (but you can't use -k)
You can add the same file using http/https, except it WON'T expand it so back to the RUN dilemma you get:
RUN apt-get install wget && \ wget foo.tar.gz && \ tar xvkf foo.tar.gz -C dir && \ rm foo.tar.gz
There are no comments on this comment yet.
the way to create small docker image is:
It should be replaced with actual first-order dockerfile statementsYou can use multi-stage builds, but they are sort of hacky and do not match your thinking.
You can also use --squash but it is a hack too and usually is not available where needed because of experimental.
Also, ADD is stupid.
You can add a tar.gz file and it will expand it (but you can't use -k)
You can add the same file using http/https, except it WON'T expand it so back to the RUN dilemma you get: