evanli
(Evanli)
1
I’m starting a docker container with my own network configuration:
[root@localhost ~]# docker run --net=none \
--lxc-conf="lxc.network.type=veth" \
--lxc-conf="lxc.network.ipv4=10.0.0.100/24" \
--lxc-conf="lxc.network.ipv4.gateway=10.0.0.1" \
--lxc-conf="lxc.network.link=br0" \
--lxc-conf="lxc.network.name=eth0" \
--lxc-conf="lxc.network.flags=up" \
-i -t --rm centos /bin/bash
But as you can see, eth0 doesn’t up at all:
[root@70a7109e7ecd /]# ip addr list
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
[root@70a7109e7ecd /]# exit
exit
What’s wrong with my docker run command?
programmerq
(Jeff Anderson)
2
Hello,
Could you share what exec driver you are using?
You should be able to find that by doing docker info
at the command line, and looking at Execution Driver:
.
If it is anything other than the LXC execdriver, would explain why your --lxc-conf
options are not taking effect.
evanli
(Evanli)
3
Hi Jeff,
Thanks for your reply. This is my docker info
:
[root@localhost ~]# docker info
Containers: 7
Images: 3
Storage Driver: devicemapper
Pool Name: docker-253:1-34819796-pool
Pool Blocksize: 65.54 kB
Data file: /var/lib/docker/devicemapper/devicemapper/data
Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata
Data Space Used: 573.6 MB
Data Space Total: 107.4 GB
Metadata Space Used: 1.217 MB
Metadata Space Total: 2.147 GB
Library Version: 1.02.84-RHEL7 (2014-03-26)
Execution Driver: native-0.2
Kernel Version: 3.10.0-123.el7.x86_64
Operating System: CentOS Linux 7 (Core)
So how to install the LXC execdriver?
I have also raised this as an issue in the docker repo - https://github.com/docker/docker/issues/10376