Here’s the deal. I have a machine running docker server
It has eth0 (we’ll call it 172.19.14.10) and eth1 (we’ll call it 172.17.14.10)
I create two networks
docker network create --subnet=172.20.14.0/24 --gateway=172.20.14.1 eth0
docker network create --subnet=172.21.172.0/22 --gateway=172.21.172.1 eth1
Then I create my container
docker create -it --net eth0 --name test <image}
Then I attach the 2nd network
docker network connect eth1 test
My docker compose has a single command that runs on 172.21.14.2 on udp port 3480. This is where I can’t figure out how to invoke my container, as everything gives me an error.
What’s the command I use here?
If I use docker start test, it doesn’t work.
If I use docker run, I can’t refer to it by name, so it also doesn’t work, as it uses the default networks.
I’m stuck here and don’t know what to do.