I am trying to assign a static public IP for docker container. I created the network using
docker network create --subnet --ip-range --gateway shared_hw
and used this network while running the container using following command
docker run --net shared_hw --ip ip --name container1 -it rhel7:latest /bin/bash
I am running docker on virtual machine. I am able to ping ip assigned to container from host machine and i am able to ping host machine ip from container but i am not able to ping container from outside the host machine and not able to ping other ip address present in our network...
Is there anything i need to add to the configuration to make it work? Any help is appreciated…
I went through following links for assigning static public IP to the container
Thanks in advance