Reputation: 6794
Let's say that I have several Docker containers. Each is serving code that was originally pulled from a remote Git repository when the container was started. However, now some of the containers are serving code that is behind the remote master branch. I want to get all of them up-to-date.
I realize that I could probably run docker exec -it [container_id] bash
and then manually git pull
inside of each of my containers, but that does not seem like a very scalable or practical option.
Is there an existing method for automating the code-pulls of my Docker containers? Are webhooks the proper way of going about this?
Upvotes: 1
Views: 284
Reputation: 54790
You can use web hooks assuming that you have a reachable endpoint. I prefer building new docker images when your repo is updated but going with your approach you can consider something like:
docker run
A, B, and C with --volumes-from W
Upvotes: 1