hi,
i am new to dockers. i have docker installed host machine with ubuntu 18.04 with docker. The host has one ip address on LAN network (enp1s0f0 : 192.168.17. 35) to login to the host from other system. Also, as part of docker utility, host has got docker0 interface (172.17.0.0) which is assigning ips to various containers through dhcp. Now my requirement is to have a container that will have ip adess in the range of 192.168.17.x insted of 172.17.0.0. Other containers are running with 172.17.x.x should not be disturbed.
I have tried doing
docker network create --subnet=192.168.17.0/24 mynet
docker network connect --ip 192.168.17.36 mynet mycontainer
i get interface eth1 with this ip but i am not able to ping or reach internet via this network.
i dont want to go with ip frowarding, as i want to use many ports on the container.
How to proceed in this regard?
thanks in advance.