1activegeek / docker-airconnect

AirConnect container for turning Chromecast into Airplay targets
238 stars 27 forks source link

Docker Compose w/ Commands #31

Closed spencerthayer closed 2 years ago

spencerthayer commented 3 years ago

How would I pass a command like -c <mp3[:<rate>]|flc[:0..9]|wav> to airconnect using a docker-compose file?

The following compose file doesn't seem to work, get's the following error ifelse: fatal: unable to exec -c: No such file or directory [cmd] -c exited 127.

  airconnect:
    image: 1activegeek/airconnect
    container_name: airconnect
    network_mode: host
    privileged: true
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=1000
      - UMASK=022
    command: -c wav
1activegeek commented 3 years ago

consult the compose documentation on specifics - but im fairly certain you will need some sort of quotes or ticks to get the entire command issued - with a space like that, it's not taking the whole command per the message you received.

spencerthayer commented 2 years ago

Do you know how I could edit the config.xml file with this installation method?

1activegeek commented 2 years ago

Map it to a local file using volume mapping.

spencerthayer commented 2 years ago

Sure so like the following?

  airconnect:
    image: 1activegeek/airconnect
    container_name: airconnect
    network_mode: host
    privileged: true
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=1000
      - UMASK=022
    volumes:
      - /appdata/airconnect:/airconnect

When I do that I get an empty directory.

1activegeek commented 2 years ago

I'd suggest reading up on some docker documentation for mapping volumes. Bottom line if you map the file directly you'll have no issue. Producing a sample file, that's more complicated and you'll need to follow the original developer instructions to see a sample file which is probably quicker and easier.