OpenMediaVault-Plugin-Developers / openmediavault-compose

openmediavault plugin for docker-compose
14 stars 5 forks source link

mac_address in docker compose ignored #25

Closed isegals closed 7 months ago

isegals commented 7 months ago

Hello, mac_address in docker compose seems to be ignored, but mac-address via docker run works fine. Example:

version: '3.0'
services:
  xeoma:
    container_name: xeoma
    image: coppit/xeoma
    restart: on-failure
    hostname: xeoma
    mac_address: 08:ae:ef:44:26:59 
    ports:
      - "8097:8090"
      - "10097:10090"
    volumes:
      - CHANGE_TO_COMPOSE_DATA_PATH/xeoma/config:/config
      - CHANGE_TO_COMPOSE_DATA_PATH/xeoma/archive-cache:/archive-cache
      - /mnt/ssd/tmp/xeoma/archive:/archive 
    environment: 
      - VERSION=https://felenasoft.com/xeoma/downloads/2023-08-10/linux/xeoma_linux64.tgz
      - PASSWORD="admin"
docker run --name=xeoma \
  -d \
  -p 8097:8090 \
  -p 10097:10090 \
  -v /local/xeoma/config:/config \
  -v /local/xeoma/archive:/archive \
  -e VERSION=https://felenasoft.com/xeoma/downloads/2023-08-10/linux/xeoma_linux64.tgz \
  -e PASSWORD=admin \
  --hostname=xeoma \
  --mac-address 08:ae:ef:44:26:59 \
  --restart on-failure \
  coppit/xeoma
ryecoaaron commented 7 months ago

The compose plugin doesn't control what the docker engine or docker compose supports. Looking at the compose docs, I see this note though: image https://docs.docker.com/compose/compose-file/05-services/#mac_address OMV 7 is using a version of docker this applies to - docker-ce 5:25.0.2-1~debian.12~bookworm

isegals commented 7 months ago

in the first message, I meant compose plugin but not docker compose It's strange thing because with portainer stack I can assign MAC for the first run. But after each restart of the container the MAC address changes, and this behavior began after installing some updates for OMV (this happens regardless of how the container was made docker run, portainer stacks or compose-plugin)

ryecoaaron commented 7 months ago

I cant explain anymore than what the docker compose page tells me. The plugin is literally creating a file and telling docker compose to use it. I dont use portainer and dont know how it works when running a stack.