docker-compose.yml 841 B

123456789101112131415161718192021222324252627282930313233343536
  1. version: '2.3'
  2. volumes:
  3. cache:
  4. services:
  5. librespot:
  6. build: .
  7. image: docker.io/fphammerle/librespot
  8. group_add: [29] # stat --format='%g %n' /dev/snd/*
  9. command: librespot
  10. --name librespot-docker-compose-test
  11. --device-type computer
  12. --cache /var/cache/librespot
  13. --backend alsa
  14. --device surround21:CARD=PCH,DEV=0
  15. --enable-volume-normalisation
  16. --volume-ctrl linear
  17. --initial-volume 25
  18. --autoplay
  19. --verbose
  20. read_only: yes
  21. volumes:
  22. - type: volume
  23. source: cache
  24. target: /var/cache/librespot # $LIBRESPOT_CACHE_PATH
  25. devices:
  26. - /dev/snd
  27. userns_mode: host
  28. network_mode: host
  29. cap_drop: [all]
  30. security_opt: [no-new-privileges]
  31. cpus: 0.4
  32. mem_limit: 32M
  33. # https://docs.docker.com/compose/compose-file/compose-file-v2/