Changes
Jump to navigation
Jump to search
← Older edit
Newer edit →
Docker
(edit)
Revision as of 18:52, 18 July 2016
11 bytes added
,
18:52, 18 July 2016
m
→Restoring into a new container
Line 62:
Line 62:
$ docker run -d --name looper2 --security-opt seccomp:unconfined busybox /bin/sh -c 'i=0; while true; do echo $i; i=$(expr $i + 1); sleep 1; done'
$ docker run -d --name looper2 --security-opt seccomp:unconfined busybox /bin/sh -c 'i=0; while true; do echo $i; i=$(expr $i + 1); sleep 1; done'
−
+
# wait a few seconds to give the container an opportunity to print a few lines, then
# wait a few seconds to give the container an opportunity to print a few lines, then
$ docker checkpoint --image-dir=/tmp/checkpoint1 looper2
$ docker checkpoint --image-dir=/tmp/checkpoint1 looper2
−
+
$ docker create --name looper-force --security-opt seccomp:unconfined busybox /bin/sh -c 'i=0; while true; do echo $i; i=$(expr $i + 1); sleep 1; done'
$ docker create --name looper-force --security-opt seccomp:unconfined busybox /bin/sh -c 'i=0; while true; do echo $i; i=$(expr $i + 1); sleep 1; done'
−
+
$ docker restore --force=true --image-dir=/tmp/checkpoint1 looper-force
$ docker restore --force=true --image-dir=/tmp/checkpoint1 looper-force
−
You should be able to print the logs from <code>looper-force</code> and see that they start from wherever the logs of <code>looper</code> end.
+
You should be able to print the logs from <code>looper-force</code> and see that they start from wherever the logs of <code>looper</code> end.
=== usage ===
=== usage ===
Boucher
21
edits
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Request account
Log in
Namespaces
Page
Discussion
Variants
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help
Tools
Special pages
Printable version
News
Twitter
YouTube
External resources
Github / source code
Issues / bugs
Mr. Jenkins
Open Hub
OpenVZ