forked from Doma/docker-mopidy
71ab329e4eaa880efe275da9824f9da089110f57
docker-mopidy
Containerized Mopidy music server with support for MPD clients and HTTP clients.
Features
- Follows official installation on top of Debian.
- With backend extensions for:
- Mopidy-Spotify for Spotify (Premium)
- Mopidy-GMusic for Google Play Music
- Mopidy-SoundClound for SoundCloud
- Mopidy-YouTube for YouTube
- With Mopidy-Moped web extension.
- Runs as
mopidyuser inside the container.
You may install additional backend extensions.
Usage
General usage (see mopidy commands):
$ docker run -d \
-v /dev/snd:/dev/snd --lxc-conf='lxc.cgroup.devices.allow = c 116:* rwm' \
-v $PWD/media:/var/lib/mopidy/media:ro \
-v $PWD/local:/var/lib/mopidy/local \
-p 6600:6600 -p 6680:6680 \
wernight/mopidy \
-o spotify/username=USERNAME -o spotify/password=PASSWORD \
-o gmusic/username=USERNAME -o gmusic/password=PASSWORD \
-o soundcloud/auth_token=TOKEN
Most elements are optional (see some examples below). Replace USERNAME, PASSWORD, TOKEN accordingly if needed, or disable services (e.g., -o spotify/enabled=false):
- For Spotify you'll need a Premium account.
- For Google Music use your Google account (if you have 2-Step Authentication, generate an app specific password).
- For SoundCloud, just get a token after registering.
Ports:
- 6600 - MPD server
- 6680 - HTTP server
Volumes:
/var/lib/mopidy/media- Path to directory with local media files (optional)./var/lib/mopidy/local- Path to directory to store local metadata such as libraries and playlists in (optional)./dev/snd- Used to share ALSA socket and play audio along with--lxc-conf(see http://stackoverflow.com/q/28985714/167897).
Example using HTTP client to stream local files
-
Give read access to your audio files to user 102 (
mopidy), group 29 (audio), or all users (e.g.,$ chgrp -R 29 $PWD/media && chmod -R g+r $PWD/media). -
Index local files:
$ docker run --rm -v $PWD/media:/var/lib/mopidy/media:ro -v $PWD/local:/var/lib/mopidy/local -p 6800:6800 wernight/mopidy local scan -
Start the server:
$ docker run -d -v $PWD/media:/var/lib/mopidy/media:ro -v $PWD/local:/var/lib/mopidy/local -p 6800:6800 wernight/mopidy -
Browse to http://localhost:6800/
Example using ncmpcpp MPD console client
$ docker run --name mopidy -d wernight/mopidy
$ docker run --rm -it --link mopidy:mopidy wernight/ncmpcpp --host mopidy
Feedbacks
Having more issues? Report a bug on GitHub.
Description
Containerized Mopidy MPD (Music Player Daemon) along with Spotify, Google Music... plugins.
Languages
Dockerfile
92.3%
Shell
7.7%