Update libcontainer readme and todo list
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
parent
aca132a1dd
commit
ff10ab55d2
2 changed files with 72 additions and 55 deletions
|
@ -16,22 +16,31 @@ process are specified in this file. The configuration is used for each process
|
|||
Sample `container.json` file:
|
||||
```json
|
||||
{
|
||||
"hostname": "koye",
|
||||
"tty": true,
|
||||
"environment": [
|
||||
"hostname" : "koye",
|
||||
"networks" : [
|
||||
{
|
||||
"gateway" : "172.17.42.1",
|
||||
"context" : {
|
||||
"bridge" : "docker0",
|
||||
"prefix" : "veth"
|
||||
},
|
||||
"address" : "172.17.0.2/16",
|
||||
"type" : "veth",
|
||||
"mtu" : 1500
|
||||
}
|
||||
],
|
||||
"cgroups" : {
|
||||
"parent" : "docker",
|
||||
"name" : "11bb30683fb0bdd57fab4d3a8238877f1e4395a2cfc7320ea359f7a02c1a5620"
|
||||
},
|
||||
"tty" : true,
|
||||
"environment" : [
|
||||
"HOME=/",
|
||||
"PATH=PATH=$PATH:/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
"container=docker",
|
||||
"TERM=xterm-256color"
|
||||
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
|
||||
"HOSTNAME=11bb30683fb0",
|
||||
"TERM=xterm"
|
||||
],
|
||||
"namespaces": [
|
||||
"NEWIPC",
|
||||
"NEWNS",
|
||||
"NEWPID",
|
||||
"NEWUTS",
|
||||
"NEWNET"
|
||||
],
|
||||
"capabilities": [
|
||||
"capabilities" : [
|
||||
"SETPCAP",
|
||||
"SYS_MODULE",
|
||||
"SYS_RAWIO",
|
||||
|
@ -48,22 +57,36 @@ Sample `container.json` file:
|
|||
"MAC_ADMIN",
|
||||
"NET_ADMIN"
|
||||
],
|
||||
"networks": [{
|
||||
"type": "veth",
|
||||
"context": {
|
||||
"bridge": "docker0",
|
||||
"prefix": "dock"
|
||||
"context" : {
|
||||
"apparmor_profile" : "docker-default"
|
||||
},
|
||||
"address": "172.17.0.100/16",
|
||||
"gateway": "172.17.42.1",
|
||||
"mtu": 1500
|
||||
"mounts" : [
|
||||
{
|
||||
"source" : "/var/lib/docker/containers/11bb30683fb0bdd57fab4d3a8238877f1e4395a2cfc7320ea359f7a02c1a5620/resolv.conf",
|
||||
"writable" : false,
|
||||
"destination" : "/etc/resolv.conf",
|
||||
"private" : true
|
||||
},
|
||||
{
|
||||
"source" : "/var/lib/docker/containers/11bb30683fb0bdd57fab4d3a8238877f1e4395a2cfc7320ea359f7a02c1a5620/hostname",
|
||||
"writable" : false,
|
||||
"destination" : "/etc/hostname",
|
||||
"private" : true
|
||||
},
|
||||
{
|
||||
"source" : "/var/lib/docker/containers/11bb30683fb0bdd57fab4d3a8238877f1e4395a2cfc7320ea359f7a02c1a5620/hosts",
|
||||
"writable" : false,
|
||||
"destination" : "/etc/hosts",
|
||||
"private" : true
|
||||
}
|
||||
],
|
||||
"cgroups": {
|
||||
"name": "docker-koye",
|
||||
"parent": "docker",
|
||||
"memory": 5248000
|
||||
}
|
||||
"namespaces" : [
|
||||
"NEWNS",
|
||||
"NEWUTS",
|
||||
"NEWIPC",
|
||||
"NEWPID",
|
||||
"NEWNET"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
@ -1,17 +1,11 @@
|
|||
#### goals
|
||||
* small and simple - line count is not everything but less code is better
|
||||
* clean lines between what we do in the pkg
|
||||
* provide primitives for working with namespaces not cater to every option
|
||||
* extend via configuration not by features - host networking, no networking, veth network can be accomplished via adjusting the container.json, nothing to do with code
|
||||
|
||||
#### tasks
|
||||
* proper tty for a new process in an existing container
|
||||
* use exec or raw syscalls for new process in existing container
|
||||
* setup proper user in namespace if specified
|
||||
* implement hook or clean interface for cgroups
|
||||
* reexec or raw syscalls for new process in existing container
|
||||
* example configs for different setups (host networking, boot init)
|
||||
* improve pkg documentation with comments
|
||||
* testing - this is hard in a low level pkg but we could do some, maybe
|
||||
* pivot root
|
||||
* selinux
|
||||
* apparmor
|
||||
|
|
Loading…
Reference in a new issue