I'm trying to create a Docker macvlan interface to assign a public IP to a container and allow it to access the internet directly, using bellow command
docker network create -d macvlan --subnet=212.xx.xxx.xxx/32 --gateway=22.214.171.124 -o parent=eno1 my-macvlan-net
but I'm getting bellow error
no matching subnet for gateway 126.96.36.199
The problem is, i'm using a server from a provider, and they provide a single gateway to all servers "188.8.131.52", which is not on the same subnet of the server, using virtualbox or vmware it works without any problem using bellow interfaces file (debian vm):
auto eth0 iface eth0 inet static address 212.xx.xxx.xxx netmask 255.255.255.255 pointopoint 184.108.40.206 gateway 220.127.116.11
I searched the internet thorougly and couldn't find a solution, I don't want to use a loadbalancer or a reverse proxy ...etc, is there a way to force Docker to create a network with this config?!!