Changes

Jump to navigation Jump to search
314 bytes added ,  09:28, 26 October 2021
no edit summary
Line 3: Line 3:  
== Container Checkpoint/Restore ==
 
== Container Checkpoint/Restore ==
   −
Create a container with ID "looper" based on the "ubuntu:latest" image.
+
{{Note|<code>ctr</code> is unsupported debug and administrative client for interacting with the containerd daemon. The commands, options, and operations are not guaranteed to be backward compatible or stable from release to release of the containerd project.}}
   −
ctr image pull docker.io/library/ubuntu:latest
+
Pull "ubuntu:latest" image if not already available locally.
ctr run -d docker.io/library/ubuntu:latest looper /bin/sh -c 'i=0; while true; do echo $i; i=$(expr $i + 1); sleep 1; done'
     −
  ctr containers checkpoint looper cr0
+
  ctr image pull docker.io/library/redis:alpine
   −
ctr task kill -s SIGKILL looper
+
Create and run a container with ID "looper"
ctr task rm looper
     −
  ctr containers rm looper
+
  ctr run --runtime io.containerd.runc.v1 -d docker.io/library/redis:alpine redis
 +
 
 +
Create container checkpoint
 +
 
 +
ctr c checkpoint --rw --task redis checkpoint/redis:20211011
 +
 
 +
 
 +
Restore container from checkpoint
 +
 
 +
ctr c restore redis-debug checkpoint/redis:20211011
277

edits

Navigation menu