Issue: When pulling from github inside docker, it won't update the cached docker image.
You can force it to by using the git api to pull down the latest commit meta data and saving that to the image. This works and stays in synch with every new update to your repo, which you want to pull. No commits mean no new meta data so your docker will use the cached version. If you commits, this makes a new SHA which gets pulled in the API, invalidating cached
ADD https://[email protected]/repos/some_org/some_repo/git/refs/heads cachebust
RUN git clone https://[email protected]/some_org/some-repo-git.git
Ref: https://stackoverflow.com/questions/13735051/how-to-capture-curl-output-to-a-file