I've been doing some experimenting with Docker and Portainer on Ubuntu Server, and I had a use case pop up that I was curious to know if it would be possible to implement.
- The Docker host is on
192.168.1.100
- I set up macvlan network
- I create a new container (App A) that uses port 1000 and give it the macvlan IP address
192.168.1.200
- I then want to create a new container (App B) that uses port 2000, but also have the IP address
192.168.1.200
- I can't create App B because
.200
is already in use
So my question is, is it possible to have two containers, both using 192.168.1.200
, exposing ports 1000
and 2000
, but not being accessible on 192.168.1.100
? In other words, made it look like .100
and .200
are physically separate machines?