Public IP inside container?

Hi everyone,

i have been using pipeworks for a long while now, and am looking for a docker solution.

Previously i was using the following, which would put the ip directly inside the nginx-container without appearing on the host.

~> docker run --cap-add=NET_ADMIN --dns=185.xxx.xxx.xxx nginx
~> pipework enp4s0f0 %p-%i 185.xxx.xxx.xxx/26@185.yyy.yyy.yyy @2000
~> NSPID=$(docker inspect --format='{{ .State.Pid }}' %p-%i) 
~>  [ ! -d /var/run/netns ] && mkdir -p /var/run/netns 
~>  [ -f /var/run/netns/$NSPID ] \
  && rm -f /var/run/netns/$NSPID
~> ln -s /proc/$NSPID/ns/net /var/run/netns/$NSPID
~> ip netns exec $NSPID ip route add default via 185.yyy.yyy.yyy dev eth1 table 2000
~> ip netns exec $NSPID ip rule add from 185.xxx.xxx.xxx table 2000"

Is there any equivalent in docker?

regards,
strowi