Dockerfile tips
- You should try to separate the Dockerfile into as many stages as possible, because this will allow for better caching
apt-get
:- You must run
apt-get update
andapt-get install
in the same command, otherwise you will encounter caching issues - Remember to use
apt-get install -y
, because you will have no control over the process while it’s building
- You must run
- Useful resources: