I set macvlan to spare port 80 and 443 for synology. After setting up, i can ping treafik ip, access web GUI (with macvlan ip) but testing container (nginxtest) doesnt show up in treafik GUI.
Please help me, I almost drive myself crazy but cannot find a solution for this.
Below is my setup:
#macvlan:
ip link add macvlan0 link ovs_eth1 type macvlan mode bridge
ip addr add 192.168.101.204/30 dev macvlan0
ip link set macvlan0 up
ip route add 192.168.101.204/30 dev macvlan0
docker network create frontend
docker compose:
services:
traefik:
image: traefik:latest
container_name: traefik
restart: unless-stopped
ports:
- 8081:8080
networks:
macvlan:
ipv4_address: 192.168.101.204
frontend:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /volume1/docker/traefik/traefik.yml:/traefik.yaml
nginxtest:
image: nginx
container_name: nginxtest
labels:
- traefik.http.routers.nginxtest.rule=Host(`test273.lab.com`)
- traefik.http.routers.whoami.entrypoints=web
- traefik.enable= true
networks:
- frontend
networks:
frontend:
external: true
macvlan:
name: macvlan
driver: macvlan
driver_opts:
parent: ovs_eth1
ipam:
config:
- subnet: 192.168.101.0/24
ip_range: 192.168.101.204/30
gateway: 192.168.101.254