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:
|
Sample `container.json` file:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"hostname": "koye",
|
"hostname" : "koye",
|
||||||
"tty": true,
|
"networks" : [
|
||||||
"environment": [
|
{
|
||||||
|
"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=/",
|
"HOME=/",
|
||||||
"PATH=PATH=$PATH:/bin:/usr/bin:/sbin:/usr/sbin",
|
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
|
||||||
"container=docker",
|
"HOSTNAME=11bb30683fb0",
|
||||||
"TERM=xterm-256color"
|
"TERM=xterm"
|
||||||
],
|
],
|
||||||
"namespaces": [
|
"capabilities" : [
|
||||||
"NEWIPC",
|
|
||||||
"NEWNS",
|
|
||||||
"NEWPID",
|
|
||||||
"NEWUTS",
|
|
||||||
"NEWNET"
|
|
||||||
],
|
|
||||||
"capabilities": [
|
|
||||||
"SETPCAP",
|
"SETPCAP",
|
||||||
"SYS_MODULE",
|
"SYS_MODULE",
|
||||||
"SYS_RAWIO",
|
"SYS_RAWIO",
|
||||||
|
@ -48,22 +57,36 @@ Sample `container.json` file:
|
||||||
"MAC_ADMIN",
|
"MAC_ADMIN",
|
||||||
"NET_ADMIN"
|
"NET_ADMIN"
|
||||||
],
|
],
|
||||||
"networks": [{
|
"context" : {
|
||||||
"type": "veth",
|
"apparmor_profile" : "docker-default"
|
||||||
"context": {
|
|
||||||
"bridge": "docker0",
|
|
||||||
"prefix": "dock"
|
|
||||||
},
|
},
|
||||||
"address": "172.17.0.100/16",
|
"mounts" : [
|
||||||
"gateway": "172.17.42.1",
|
{
|
||||||
"mtu": 1500
|
"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": {
|
"namespaces" : [
|
||||||
"name": "docker-koye",
|
"NEWNS",
|
||||||
"parent": "docker",
|
"NEWUTS",
|
||||||
"memory": 5248000
|
"NEWIPC",
|
||||||
}
|
"NEWPID",
|
||||||
|
"NEWNET"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,11 @@
|
||||||
#### goals
|
#### goals
|
||||||
* small and simple - line count is not everything but less code is better
|
* 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
|
* 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
|
* 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
|
#### tasks
|
||||||
* proper tty for a new process in an existing container
|
* reexec or raw syscalls for new process in 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
|
|
||||||
* example configs for different setups (host networking, boot init)
|
* example configs for different setups (host networking, boot init)
|
||||||
* improve pkg documentation with comments
|
* improve pkg documentation with comments
|
||||||
* testing - this is hard in a low level pkg but we could do some, maybe
|
* testing - this is hard in a low level pkg but we could do some, maybe
|
||||||
* pivot root
|
|
||||||
* selinux
|
* selinux
|
||||||
* apparmor
|
|
||||||
|
|
Loading…
Reference in a new issue