You message someone in the same room to
git clone in a Dockerfile during a docker build is a common use case.
If I use the image cache git clone odes not run (so no fresh copy of repo)! Using
--no-cachemakes the docker build slow - aasregenerating each layer.
git cloneas far down in the Dockerfile as possible.
git clone https://www.eco-platform.co.uk/content/devops.wiki.git wiki.18036.1528
Now the cache will be used for almost all Dockerfile layers. And the new wiki.18036.1528 timestamp guarantees that docker will run the git clone again.
Last edited by apollo, 2018-11-13 18:42:15