Enable Docker's Checkpoint Feature to Take Snapshots

How to enable the Docker checkpoint feature to take snapshots of your running containers

Learn how to turn on the Docker checkpoint feature for running container snapshots with this quick tutorial from expert Jack Wallen.

Verfasst von
Jack Wallen
Jack Wallen
Feb 28, 2023

In a recent TechRepublic video, Jack Wallen shows how to enable the Docker checkpoint feature to take snapshots of your running containers to save a state for backup or later usage. The following is an edited transcript of his tutorial.

First, you must add the repository for the CRIU package with the following command: SUDU add-apt-repository ppa:criu/ppa.

Update APT with this command: sudo apt-get update.

Then install CRIU with this command: sudo apt-get install criu -y.

Next, we must enable Docker experimental features.

First, create a new file with the command sudo nano /etc/docker/daemon.json.

In that file, add the following: {"Experimental": true}. Save and close the file.

Restart the Docker Daemon with sudo systemctl restart docker.

Deploy an NGINX container with the command docker run --name nginx-checkpoint -p 8005:80 -d nginx.

Create the checkpoint with this command: docker checkpoint create --leave-running=true nginx-checkpoint checkpoint.

For more tutorials from Jack Wallen, subscribe to TechRepublic’s YouTube channel How To Make Tech Work — and remember to like this video.

If you are interested in learning more about Docker, you can check out the following resources in TechRepublic Academy:
Hacking and Securing Docker Containers
Linux and Docker Coding Bundle
Docker and Kubernetes mini-bundle

Jack Wallen

Jack Wallen is an award-winning writer for TechRepublic, The New Stack, and Linux New Media. He's covered a variety of topics for over twenty years and is an avid promoter of open source. For more news about Jack Wallen, visit his website jackwallen.com.