I want to access the container over the lan (from different machines) using IP of the containers.
I was trying the following way. None of them worked (i.e., not accessible from other LAN machine, nor host as well). My host IP is 10.10.1.36 with Mask 255.255.255.0 and interface is enp1s0. I can see the ips are getting assigned to the container properly.
services:
server:
...
...
network:
test_network:
ipv4_address: 10.10.1.200
networks:
test_network:
name: test-network
driver: macvlan
driver_opts:
parent: enp1s0 # route | grep '^default' | grep -o '[^ ]*$'
mode: Passthru # tried with, without (i.e., bridge) both
ipam:
config:
- subnet: 10.10.1.0/24 # same as my host
gateway: 10.10.1.1 # same as my host
# ip_range: 10.10.1.192/26 # smaller dhcp range
What am I doing wrong? anything else I have to do? How do I get these working?