Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker compose example #13

Open
tristan-k opened this issue Aug 8, 2021 · 4 comments
Open

docker compose example #13

tristan-k opened this issue Aug 8, 2021 · 4 comments

Comments

@tristan-k
Copy link

Can you provide a docker compose example for the docker run example? As a docker newbie I find it really difficult to translate some of the commands.

version: "3.6"
services:
    shairport-sync:
        container_name: shairport-sync
        image: mikebrady/shairport-sync
        command: -a Shairport-Sync-Name -- -d hw:0 -c PCM
        restart: unless-stopped
        network_mode: host
        devices:
            - /dev/snd
@charlesomer
Copy link

Something like this?

shairport-sync:
    image: mikebrady/shairport-sync
    network_mode: host
    volumes:
      - ./volumes/shairport-sync/shairport-sync.conf:/etc/shairport-sync.conf
    restart: unless-stopped
    devices:
      - "/dev/snd"
    logging:
      options:
        max-size: "200k"
        max-file: "10" 

@mpkonmbk
Copy link

I've got a problem with running this with docker-compose. Here's my YAML:

mpk@raspberrypi:~/srv/shairport-sync $ cat docker-compose.yml
version: "3.5"
networks:
  default:
    driver: bridge
    ipam:
      config:
       - subnet: 172.16.57.0/24
services:
  shairport-sync:
    image: mikebrady/shairport-sync:latest
    container_name: shairport-sync
    network_mode: host
    user: 1001:1001
    devices:
    - /dev/snd:/dev/snd
    volumes:
    - /home/mpk/srv/shairport-sync/shairport-sync.conf:/etc/shairport-sync.conf
    restart: unless-stopped

I need the networks part to be able to run it with VPN on.
Unfortunately, unless I change user to root, I get these errors:

mpk@raspberrypi:~/srv/shairport-sync $ docker-compose up -d
Creating shairport-sync ... done
mpk@raspberrypi:~/srv/shairport-sync $ docker ps -a
CONTAINER ID   IMAGE                             COMMAND                CREATED         STATUS          PORTS     NAMES
e13c65a7026b   mikebrady/shairport-sync:latest   "/start.sh"            7 seconds ago   Up 1 second               shairport-sync
e70e6966812c   jellyfin/jellyfin:10.7.6          "/jellyfin/jellyfin"   7 weeks ago     Up 35 minutes             jellyfin
mpk@raspberrypi:~/srv/shairport-sync $ docker logs e13c65a7026b --follow
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "root" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "root" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "root" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "avahi" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "root" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown group "netdev" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "root" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "shairport-sync" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "root" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "root" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "shairport-sync" in message bus configuration file
dbus-daemon[10]: Failed to start message bus: Failed to bind socket "/var/run/dbus/system_bus_socket": Permission denied
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "avahi" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown group "netdev" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "shairport-sync" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "shairport-sync" in message bus configuration file
dbus-daemon[9]: Failed to start message bus: Failed to bind socket "/var/run/dbus/system_bus_socket": Permission denied
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "avahi" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown group "netdev" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "shairport-sync" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "shairport-sync" in message bus configuration file
dbus-daemon[9]: Failed to start message bus: Failed to bind socket "/var/run/dbus/system_bus_socket": Permission denied
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "avahi" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown group "netdev" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "shairport-sync" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "shairport-sync" in message bus configuration file
dbus-daemon[9]: Failed to start message bus: Failed to bind socket "/var/run/dbus/system_bus_socket": Permission denied
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "root" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "root" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "root" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "avahi" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "root" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown group "netdev" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "root" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "shairport-sync" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "root" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "root" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "shairport-sync" in message bus configuration file
dbus-daemon[10]: Failed to start message bus: Failed to bind socket "/var/run/dbus/system_bus_socket": Permission denied
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "avahi" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown group "netdev" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "shairport-sync" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "root" in message bus configuration file
dbus[9]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[9]: Unknown username "shairport-sync" in message bus configuration file
dbus-daemon[9]: Failed to start message bus: Failed to bind socket "/var/run/dbus/system_bus_socket": Permission denied
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "root" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "root" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "root" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "avahi" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "root" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown group "netdev" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "root" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "shairport-sync" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "root" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "root" in message bus configuration file
dbus[10]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[10]: Unknown username "shairport-sync" in message bus configuration file
dbus-daemon[10]: Failed to start message bus: Failed to bind socket "/var/run/dbus/system_bus_socket": Permission denied

any ideas?

@mikebrady
Copy link
Owner

mikebrady commented Nov 28, 2021

We are hoping to simplify the user situation to use root only in the not-too-distant future.

@captcarl13
Copy link

I too am interested in a docker-compose.yml file for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants