3 ms·
If OP looks up some Dockerfiles on docker hub, this will make more sense. Look at this mysql file for instance: https://github.com/docker-library/mysql/blob/69
by djsumdog 8y ago
If OP looks up some Dockerfiles on docker hub, this will make more sense. Look at this mysql file for instance:
https://github.com/docker-library/mysql/blob/696fc899126ae00771b5d87bdadae836e704ae7d/8.0/Dockerfile https://github.com/docker-library/mysql/blob/696fc899126ae00...
If two Dockerfiles use debain:stretch-slim as their base, docker won't download both base images twice. Each command in the Dockerfile creates an image. If you copy a Dockerfile and just change the last line and build them in order, the 2nd build will run a lot faster and you'll see in the output it pulls out "cached images" since it's already run those commands (docker build --no-cache always forced a full build).
If you start making Dockerfiles and playing around with it, it will start to make more sense.