Skip to content
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

Kitchen-docker with 2 IP addresses or 2 interfaces within one container. #327

Open
dinbtechit opened this issue Mar 4, 2019 · 0 comments

Comments

@dinbtechit
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant