1

I have a dependency which is cloned from a remote git repo, then built and inserted into my app:

RUN git clone git@remote_repo.git .
RUN build

Naturally this repo is being developed in parallel and is updated from time to time.

Is there a way to check if it has new changes during docker-compose build run and rebuild it if needed?

Sergei Basharov
  • 51,276
  • 73
  • 200
  • 335
  • I think this question: [How to prevent Dockerfile caching git clone](https://stackoverflow.com/questions/36996046/how-to-prevent-dockerfile-caching-git-clone) has some info which (maybe) could be applied to your `docker-compose` case. – tgogos Nov 15 '17 at 16:28
  • Also, a solution which ignores the *rebuild it if needed* part of your question would be the `--no-cache` option – tgogos Nov 15 '17 at 16:35

0 Answers0