kitchen-docker
kitchen-docker copied to clipboard
Kitchen-docker with 2 IP addresses or 2 interfaces within one container.
Is it possible to have 2 IP addresses or 2 interfaces within one container?
.kitchen.yml
. . .
platforms:
- name: centos-7
driver_config:
dockerfile: Dockerfile
build_options:
tag: company/test:latest
rm: true
container_name: test
instance_name: test
forward: # HostPort:ContainerPort
- 443:443
- 80:80
volume:
- "/sys/fs/cgroup:/sys/fs/cgroup:ro"
. . .
Currently I have only 2 interfaces eth0 and lo. I want to add another interface with eth1. Is it possible to do that in Kitchen-docker? Any help is massively appreciated.
[test@0e4d18169fcb ~]$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.17.0.2 netmask 255.255.0.0 broadcast 172.17.255.255
ether 02:42:ac:11:00:02 txqueuelen 0 (Ethernet)
RX packets 23994 bytes 46742936 (44.5 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 15011 bytes 972540 (949.7 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 0 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0