I try to setup a server with photon OS.
My goal is to setup the containers with a own static ip address in there own network subnet (public not internal subnet on the machine)
For the Containers I created a subnet with following specs:
172.25.30.0 - 172.24.31.254
Subnet Mask: 255.255.254.0/23
Reserved IPs: 172.25.30.0 - .20
PhotonOS: 172.25.30.10 (inside the network)
So i created a config template:
docker network create
And the network:
docker network create --attachable -d bridge --scope=swarm --config-from docker-network-config docker-network
After that i created a testcontainer with
docker run -it --rm --net=docker-network --ip=172.25.30.31 alpine /bin/sh
So i test the ip address inside with ip a
it showed the 172.25.30.11 (not my static ip)
A ping from server and from a other host to the container both fails - the ip is not available.
Why that? Can somebody help my? What is wrong?