4

I am trying to find a way to run 2 services that uses MAC addresses as unique networkIDs on my SmartThings hub (cast-web-api and MQTT-Bridge)

Right now, I built a docker-compose.yml file that does what I need but I would like to bridge my eth0 to 2 different MAC addresses on the containers. The goal is to keep DHCP and assign static IP in my router to "Mac1" "Mac2".

I am using Docker version 19.03.1 and docker-compose version 1.24.1

I tried, without success to use "mac_address:" Also tried to run the interface and the build using that interface using an example like : This post

My file so far (Version 1)

mqtt:
    image: arm32v6/eclipse-mosquitto
    volumes:
        - ./mosquitto/config:/mosquitto/config
        - ./mosquitto/data:/mosquitto/data
        - ./mosquitto/log:/mosquitto/log
    ports:
        - "1883:1883"

mqttbridge:
    image: st_mqtt_bridge
    volumes:
        - ./mqtt-bridge:/config
    ports:
        - "8082:8082"
    links:
        - mqtt

cast-web-api:
    image: cast-web-api
    volumes:
        - ./cast-web/config:/config
    ports:
        - "3000:3000"

Would it be possible to achieve what I described previously ? Maybe Macvlan bridging ? Do I need to upgrade docker-compose to version 2 or 3 ?

JMB
  • 61
  • 7
  • Just to clarify, do you want `mqttbridge` and `cast-web-api` containers to get a pre-defined MAC address using `docker-compose` file? – 7_R3X Aug 09 '19 at 07:24
  • That is exactly right. To the outside network they would get 2 different IP allowed from the DHCP – JMB Aug 09 '19 at 16:10

0 Answers0