An open and reliable container runtime https://github.com/containerd/containerd
Go to file
Michael Crosby ae9b2bafd5 Add basic checkpoint and restore support
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-12-03 16:07:53 -08:00
api/v1 Add basic checkpoint and restore support 2015-12-03 16:07:53 -08:00
containerd Make events chan local to supervisor 2015-12-02 17:44:39 -08:00
ctr Add basic frame and ctr command line client 2015-12-02 14:41:49 -08:00
linux Add basic checkpoint and restore support 2015-12-03 16:07:53 -08:00
runc Add runc support 2015-12-02 16:37:46 -08:00
runtime Add basic checkpoint and restore support 2015-12-03 16:07:53 -08:00
.gitignore Improve process addition and removal 2015-11-13 13:25:03 -08:00
README.md Change /containers to /state with machine info 2015-12-03 11:49:56 -08:00
add_process.go Refactor event loop with types 2015-12-01 10:55:13 -08:00
checkpoint.go Add basic checkpoint and restore support 2015-12-03 16:07:53 -08:00
delete.go Move runtime implementation types to pkg 2015-12-01 11:56:08 -08:00
errors.go Move libcontainer to linux pkg 2015-12-01 12:00:11 -08:00
event.go Add basic checkpoint and restore support 2015-12-03 16:07:53 -08:00
exit.go Add event subscribers. 2015-12-01 18:49:24 -05:00
get_containers.go Refactor event loop with types 2015-12-01 10:55:13 -08:00
journal.go add waitgroup to journal 2015-12-02 17:17:12 -08:00
machine.go Change /containers to /state with machine info 2015-12-03 11:49:56 -08:00
signal.go Refactor event loop with types 2015-12-01 10:55:13 -08:00
start.go Add basic checkpoint and restore support 2015-12-03 16:07:53 -08:00
stats.go Refactor event loop with types 2015-12-01 10:55:13 -08:00
supervisor.go Add basic checkpoint and restore support 2015-12-03 16:07:53 -08:00
supervisor_linux.go Add linux import path 2015-12-02 10:59:43 -08:00
supervisor_unsupported.go Add runc support 2015-12-02 16:37:46 -08:00
update.go Move runtime implementation types to pkg 2015-12-01 11:56:08 -08:00
version.go Add basic frame and ctr command line client 2015-12-02 14:41:49 -08:00
worker.go Add basic checkpoint and restore support 2015-12-03 16:07:53 -08:00

README.md

containerd

another container runtime

Start a container:

curl -XPOST localhost:8888/containers/redis -d '{"bundlePath": "/containers/redis"}' 

Add a process:

curl -s -XPUT localhost:8888/containers/redis/process -d@process.json | json_pp                   
{
   "user" : {
      "gid" : 0,
      "uid" : 0
   },
   "args" : [
      "sh",
      "-c",
      "sleep 10"
   ],
   "env" : [
      "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
      "TERM=xterm"
   ]
}

Get containers and state:

curl -s localhost:8888/state | json_pp
{
   "containers" : [
      {
         "processes" : [
            {
               "args" : [
                  "sh",
                  "-c",
                  "sleep 60"
               ],
               "user" : {
                  "gid" : 0,
                  "uid" : 0
               },
               "pid" : 25743,
               "env" : [
                  "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                  "TERM=xterm"
               ]
            }
         ],
         "id" : "redis",
         "state" : {
            "status" : "running"
         },
         "bundlePath" : "/containers/redis"
      }
   ]
}

Other stuff:

# pause and resume a container
curl -XPATCH localhost:8888/containers/redis -d '{"status": "paused"}'
curl -XPATCH localhost:8888/containers/redis -d '{"status": "running"}'

# send signal to a container's specific process
curl -XPOST localhost:8888/containers/redis/process/18306 -d '{"signal": 9}'