AGhost-7/docker-dev

question about build.sh

Closed this issue · 1 comments

I am trying to understand something with your build.sh. It has a number of 'apt-install' commands.

Is there a reason they are done in the script vs. the Dockerfile? If there were done in the Dockerfile, it seems like you could then better leverage docker layering. Just wondering.

The reason for this is that it makes is easier to read. The issue with layering is that it keeps any garbage that you don't want. Most people instead run all of their steps in a single RUN command. Since I'm installing quite a fair bit of stuff I find it easier to read by putting all of my instructions in a dedicated file.