Last active
April 27, 2016 18:11
-
-
Save duglin/cc799056126143d93bd9c2e0c8a88a5d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Simple case - no hooks, etc: | |
runc create --name=test --process=myapp | |
or if you need hooks, etc... : | |
runc create --name=test | |
# process is just "sleep" | |
# creates a new container will all new NSs | |
# do pre-start hooks here | |
runc create --attach=test --ns=all --process=myapp | |
# creates a new container but attaches to all NSs from "test" | |
# when 'myapp' is done, no NSs are deleted because it didn't create them, "test" did. | |
# Note, there's an implied "runc delete" for this nested container | |
# do post-stop hooks here | |
runc delete --name=test | |
# this deletes all of test's NSs since it created them | |
I guess --process isn't right since it gets it from the config.json, but I added it just to show what the PID process is in each case |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment