Docker Advanced: Updating a deployed container

Join the AI Workshop to learn more about AI and how it can be applied to web development. Next cohort February 1st, 2026

The AI-first Web Development BOOTCAMP cohort starts February 24th, 2026. 10 weeks of intensive training and hands-on projects.


Here is how you can update a deployed container after you updated the image on Docker Hub.

First you stop the container:

docker stop <ID or name>

Then you remove the container:

docker rm <ID or name>

Then you pull the image from Docker Hub:

docker pull <image name>

Then you start a new container from the image:

docker run <image name> ...options

Of course that’s not practical to do manually.

Applications like Watchtower, deployed as a Docker container, lets you setup an automated workflow for watching changes on Docker Hub (or any other image registry) and automatically gracefully shut down an existing container and restart it with the same options that were used to deploy it initially.

Lessons in this unit:

0: Introduction
1: Working with Images from the command line
2: Working with Containers from the command line
3: Troubleshooting container exits
4: How to commit changes to an image
5: ▶︎ Updating a deployed container
6: Accessing files outside a container
7: Dockerfile for Astro on Fly.io
8: Dockerfiles for Astro and Pocketbase on Railway