As I understand from documentation and other internet posts, I need to rebuild my images in order to get the updates. This is all fine. What I’m wondering is, is there a suggested workflow? I’m running long-running containers (for websites), and currently run two different images (one with mysql libraries and one without). Currently, I don’t know exactly when an update is available, so I try to docker pull debian/jessie
periodically and see how it goes. If I get the update, I then:
- Build images (and I give them the same tags)
-
docker stop container && docker rm container && docker -d run container
so that the container gets updated. - Purge obsolete images:
docker rmi $(docker images -q --filter "dangling=true")
Is there a better workflow available, perhaps? I would love to:
- Have the ability to check for updates. Perhaps something like
docker pull --dry-run debian/jessie
to see if it is up to date. Or perhaps something along the lines ofgit remote update
andgit status -uno
- Have the ability to upgrade base images (this can be automated based on input from #1)
- Perhaps an easier way to restart containers with the new images in place
Quite possibly, there is some of it already available and I’m just not informed.
Thanks,
Miha.