-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
networking setup inside the container #37
Comments
Full {
"version": "0.1",
"os": "linux",
"arch": "amd64",
"processes": [
{
"tty": true,
"user": "root",
"args": [
"bash"
],
"env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"TERM=xterm"
],
"cwd": "/root"
}
],
"root": {
"path": "rootfs",
"readonly": false
},
"cpus": 1.1,
"memory": 1024,
"hostname": "shell",
"network": [
{
"type": "loopback",
"address": "127.0.0.1/0",
"gateway": "localhost"
},
{
"type": "veth",
"name": "net",
"bridge": "br0",
"address": "172.17.42.2",
"gateway": "172.17.42.1",
"host_interface_name": "veth0"
}
],
"namespaces": [
{
"type": "process"
},
{
"type": "network"
},
{
"type": "mount"
},
{
"type": "ipc"
},
{
"type": "uts"
}
],
"capabilities": [
"AUDIT_WRITE",
"KILL",
"NET_BIND_SERVICE",
"CHOWN",
"DAC_OVERRIDE",
"FSETID",
"FOWNER",
"MKNOD",
"NET_RAW",
"SETGID",
"SETUID",
"SETFCAP",
"SETPCAP",
"NET_BIND_SERVICE",
"SYS_CHROOT",
"KILL",
"AUDIT_WRITE"
],
"devices": [
"null",
"random",
"full",
"tty",
"zero",
"urandom"
],
"mounts": [
{
"type": "proc",
"source": "proc",
"destination": "/proc",
"options": ""
},
{
"type": "tmpfs",
"source": "tmpfs",
"destination": "/dev",
"options": "nosuid,strictatime,mode=755,size=65536k"
},
{
"type": "devpts",
"source": "devpts",
"destination": "/dev/pts",
"options": "nosuid,noexec,newinstance,ptmxmode=0666,mode=0620,gid=5"
},
{
"type": "tmpfs",
"source": "shm",
"destination": "/dev/shm",
"options": "nosuid,noexec,nodev,mode=1777,size=65536k"
},
{
"type": "mqueue",
"source": "mqueue",
"destination": "/dev/mqueue",
"options": "nosuid,noexec,nodev"
},
{
"type": "sysfs",
"source": "sysfs",
"destination": "/sys",
"options": "nosuid,noexec,nodev"
}
]
}
|
There is no network section in spec now. We probably should have some. |
I also vote for networking ... just ran across this after testing out runc |
On Fri, Jun 26, 2015 at 10:18:27AM -0700, Alexander Morozov wrote:
For what it's worth, you can currently (48182db, 2015-07-07) just
If you want ‘ping’ and similar to work in your container, add NET_RAW |
instead of adding a "namespaces": [
{
"type": "network",
"path": "/var/run/netns/something"
}
], |
@fabiokung It's definitely not so easy in many cases(we learned it hardway with libnetwork). Also for many people will be enough just veth pair or ipvlan interface by default. |
You can see my response here for a proper way to setup networking for containers spawned with runc Thanks! |
This will help. |
Hello,
runc is working fine. thanks for that.
However, I would like to get networking connectivity inside the container first and then next stage to get container talking to the host and eventually to the internet.
I've defined
network
key incontainer.json
as such:However, i can't connect to a listening socket inside the container:
Some sys details below:
$ runc -v runc version 0.1 $ uname -a Linux octopus 3.19.0-22-generic #22-Ubuntu SMP Tue Jun 16 17:15:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 15.04 Release: 15.04 Codename: vivid
How to get interface
lo
up and get the socket talking?Thanks.
The text was updated successfully, but these errors were encountered: