Docker Advanced: How to commit changes to an image

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.


What happens when you deploy your app, and then you want to fix a bug, or simply release an update?

Once you have a container running, you can get its ID using docker ps, then you use docker commit to create a new tag for the image from it:

docker commit <id> <username>/<imagename>:<tagname>

You can also add a changelog message that lists what changed in the new version:

docker commit --change "description" <id> <username>/<imagename>:<tagname>

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