I’ve been using the command line for docker for 2 weeks and just learned how to use docker compose yesterday using the excellent documentation I found at Jellyfin. I got a Jellyfin container up and running in a jiffy on my new Ubuntu Server (22.04.4 LTS) and couldn’t be happier.
I thought I’d go back to Emby and learn how to create a compose file as an exercise.
I currently use the following command line to successfully bring up Emby:
docker run -d \
--name embyserver \
--volume /home/udance4ever/emby:/config \
--volume emby-cache:/cache \
--volume /home/udance4ever/mnt/userdata/kodi:/userdata/kodi \
--device /dev/dri:/dev/dri \
--publish 8096:8096 \
--publish 8920:8920 \
--env UID=1001 \
--env GID=1001 \
--restart unless-stopped \
emby/embyserver:latest
I can’t figure out the difference between the above command line and the following compose file I “translated”:
version: '3.5'
volumes:
emby-cache:
services:
embyserver:
image: emby/embyserver:latest
container_name: embyserver
user: 1001:1001
ports:
- "8096:8096"
- "8920:8920"
volumes:
- /home/udance4ever/emby:/config
- emby-cache:/cache
- /home/udance4ever/mnt/userdata/kodi:/userdata/kodi
devices:
- /dev/dri:/dev/dri
restart: 'unless-stopped'
I use docker compose up -d to bring up the server and it just keeps restarting:
a0b30f16f381 emby/embyserver:latest "/init" About a minute ago Restarting (1) 3 seconds ago
I’m real new to docker so I don’t know where to begin to debug this compose file (and reverted to recreating the container using the command line which, again, works without error)
I’m posting here because I think it’s less about Emby and more about my understanding of how Docker compose works and its grammar.
Why does my compose file produce different results?