Difference between revisions of "Runc"
Jump to navigation
Jump to search
m |
m |
||
| Line 10: | Line 10: | ||
$ runc spec | $ runc spec | ||
| + | |||
| + | $ sed -i 's/"sh"/\"sh -c '\''i=0; while true; do echo $i; i=$(expr $i + 1); sleep 1; done'\'\"'/' config.json | ||
| + | |||
| + | $ sed -i 's/"terminal": true/"terminal": false/g' config.json | ||
| + | |||
| + | $ runc run -d looper 0</dev/null 1>/dev/null 2>/dev/null | ||
Revision as of 18:24, 9 October 2025
This article provides an overview of CRIU integration with runc and explains how to use it.
Container Checkpoint/Restore
$ mkdir -p alpine-container/rootfs && cd alpine-container
$ wget https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/x86_64/alpine-minirootfs-3.22.2-x86_64.tar.gz && \ tar -xzf alpine-minirootfs-3.22.2-x86_64.tar.gz -C rootfs && \ rm -f alpine-minirootfs-3.22.2-x86_64.tar.gz
$ runc spec
$ sed -i 's/"sh"/\"sh -c '\i=0; while true; do echo $i; i=$(expr $i + 1); sleep 1; done'\'\"'/' config.json
$ sed -i 's/"terminal": true/"terminal": false/g' config.json
$ runc run -d looper 0</dev/null 1>/dev/null 2>/dev/null