Coder Social home page Coder Social logo

wernight / docker-mopidy Goto Github PK

View Code? Open in Web Editor NEW
157.0 6.0 86.0 120 KB

Containerized Mopidy MPD (Music Player Daemon) along with Spotify, Google Music... plugins.

Home Page: https://hub.docker.com/r/wernight/mopidy/

License: MIT License

Shell 8.08% Dockerfile 91.92%

docker-mopidy's Introduction

What is Mopidy?

Mopidy is a music server with support for MPD clients and HTTP clients.

Features of this image

You may install additional backend extensions.

Usage

Playing sound from the container

There are various ways to have the audio from Mopidy running in your container to play on your system's audio output. Here are various ways, try them and find which one works for you.

/dev/snd

Simplest is by adding docker argument: --device /dev/snd. Try via:

$ docker run --rm \
    --user root --device /dev/snd \
    wernight/mopidy \
    gst-launch-1.0 audiotestsrc ! audioresample ! autoaudiosink

PulseAudio native

Mount the current user's pulse directory to the pulseuadio user (UID 105). Based on https://github.com/TheBiggerGuy/docker-pulseaudio-example.

$ docker run --rm \
    --user $UID:$GID -v /run/user/$UID/pulse:/run/user/105/pulse \
    wernight/mopidy \
    gst-launch-1.0 audiotestsrc ! audioresample ! autoaudiosink

PulseAudio over network

First to make audio work from within a Docker container, you should enable PulseAudio over network; so if you have X11 you may for example do:

  1. Install PulseAudio Preferences. Debian/Ubuntu users can do this:

    $ sudo apt-get install paprefs
    
  2. Launch paprefs (PulseAudio Preferences) > "Network Server" tab > Check "Enable network access to local sound devices" (you may check "Don't require authentication" to avoid mounting cookie file described below).

  3. Restart PulseAudio:

    $ sudo service pulseaudio restart
    

    or

    $ pulseaudio -k
    $ pulseaudio --start
    

Note: On some distributions, it may be necessary to completely restart your computer. You can confirm that the settings have successfully been applied running pax11publish | grep -Eo 'tcp:[^ ]*'. You should see something like tcp:myhostname:4713.

Now set the environment variables:

  • PULSE_SERVER - PulseAudio server socket.
  • PULSE_COOKIE_DATA - Hexadecimal encoded PulseAudio cookie commonly at ~/.config/pulse/cookie.

Example to check it works:

$ docker run --rm \
    -e "PULSE_SERVER=tcp:$(hostname -i):4713" \
    -e "PULSE_COOKIE_DATA=$(pax11publish -d | grep --color=never -Po '(?<=^Cookie: ).*')" \
    wernight/mopidy \
    gst-launch-1.0 audiotestsrc ! audioresample ! autoaudiosink

General usage

$ docker run -d \
    $PUT_HERE_EXRA_DOCKER_ARGUMENTS_FOR_AUDIO_TO_WORK \
    -v "$PWD/media:/var/lib/mopidy/media:ro" \
    -v "$PWD/local:/var/lib/mopidy/local" \
    -p 6600:6600 -p 6680:6680 \
    --user $UID:$GID \
    wernight/mopidy \
    mopidy \
    -o spotify/username=USERNAME -o spotify/password=PASSWORD \
    -o gmusic/username=USERNAME -o gmusic/password=PASSWORD \
    -o soundcloud/auth_token=TOKEN

Most arguments are optional (see some examples below):

  • Docker arguments:
    • $PUT_HERE_EXRA_DOCKER_ARGUMENTS_FOR_AUDIO_TO_WORK should be replaced with some arguments that work to play audio from within the docker container as tested above.
    • -v ...:/var/lib/mopidy/media:ro - (optional) Path to directory with local media files.
    • -v ...:/var/lib/mopidy/local - (optional) Path to directory to store local metadata such as libraries and playlists in.
    • -p 6600:6600 - (optional) Exposes MPD server (if you use for example ncmpcpp client).
    • -p 6680:6680 - (optional) Exposes HTTP server (if you use your browser as client).
    • -p 5555:5555/udp - (optional) Exposes UDP streaming for FIFE sink (e.g. for visualizers).
    • --user $UID:$GID - (optional) You may run as any UID/GID, and by default it'll run as UID/GID 84044 (mopidy:audio from within the container). The main restriction is if you want to read local media files: That the user (UID) you run as should have read access to these files. Similar for other mounts. If you have issues, try first as --user root.
  • Mopidy arguments (see mopidy's command for possible additional options), 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.

NOTE: Any user on your system may run ps aux and see the command-line you're running, so your passwords may be exposed. A safer option if it's a concern, is using putting these passwords in a Mopidy configuration file based on mopidy.conf:

[core]
data_dir = /var/lib/mopidy

[local]
media_dir = /var/lib/mopidy/media

[audio]
output = tee name=t ! queue ! autoaudiosink t. ! queue ! udpsink host=0.0.0.0 port=5555

[m3u]
playlists_dir = /var/lib/mopidy/playlists

[http]
hostname = 0.0.0.0

[mpd]
hostname = 0.0.0.0

[spotify]
username=USERNAME
password=PASSWORD

[gmusic]
username=USERNAME
password=PASSWORD

[soundcloud]
auth_token=TOKEN

Then run it:

$ docker run -d \
    $PUT_HERE_EXRA_DOCKER_ARGUMENTS_FOR_AUDIO_TO_WORK \
    -v "$PWD/media:/var/lib/mopidy/media:ro" \
    -v "$PWD/local:/var/lib/mopidy/local" \
    -v "$PWD/mopidy.conf:/config/mopidy.conf" \
    -p 6600:6600 -p 6680:6680 \
    --user $UID:$GID \
    wernight/mopidy
Example using HTTP client to stream local files
  1. Give read access to your audio files to user 84044, group 84044, or all users (e.g., $ chgrp -R 84044 $PWD/media && chmod -R g+rX $PWD/media).

  2. Index local files:

    $ docker run --rm \
        --device /dev/snd \
        -v "$PWD/media:/var/lib/mopidy/media:ro" \
        -v "$PWD/local:/var/lib/mopidy/local" \
        -p 6680:6680 \
        wernight/mopidy mopidy local scan
    
  3. Start the server:

    $ docker run -d \
        -e "PULSE_SERVER=tcp:$(hostname -i):4713" \
        -e "PULSE_COOKIE_DATA=$(pax11publish -d | grep --color=never -Po '(?<=^Cookie: ).*')" \
        -v "$PWD/media:/var/lib/mopidy/media:ro" \
        -v "$PWD/local:/var/lib/mopidy/local" \
        -p 6680:6680 \
        wernight/mopidy
    
  4. Browse to http://localhost:6680/

Example using ncmpcpp MPD console client

$ docker run --name mopidy -d \
    -v /run/user/$UID/pulse:/run/user/105/pulse \
    wernight/mopidy
$ docker run --rm -it --net container:mopidy wernight/ncmpcpp ncmpcpp

Alternatively if you don't need visualizers you can do:

$ docker run --rm -it --link mopidy:mopidy wernight/ncmpcpp ncmpcpp --host mopidy

Feedbacks

Having more issues? Report a bug on GitHub. Also if you need some additional extensions/plugins that aren't already installed (please explain why).

Alsa Audio

For non debian distros. The gid for audio group in /etc/group must be 29 to match debians default as audio:x:29:<your user outside of docker> this is to match the user id inside the docker container. You'll also need to add the output = alsasink config line under the audio section in your mopidy.conf.

$ docker run -d -rm \
  --device /dev/snd \
  --name mopidy \
  --ipc=host \
  --privileged \
  -v $HOME/.config/mopidy:/var/lib/mopidy/.config/mopidy/ \
  -p 6600:6600/tcp -p 6680:6680/tcp -p 5555:5555/udp \
  mopidy

docker-mopidy's People

Contributors

benabbottnz avatar deadended avatar deisi avatar dependabot[bot] avatar fmartingr avatar geripgeri avatar jaedb avatar m-kostrzewa avatar martinezpenya avatar sammerry avatar walm avatar wernight avatar woodham avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

docker-mopidy's Issues

Spotify client not found

I'm trying to get this up and running in docker-compose. My file looks like:

  mopidy:
    container_name: mopidy
    image: wernight/mopidy
    volumes:
    - /mnt/storage/appdata/mopidy/local:/var/lib/mopidy/local
    - /mnt/storage/appdata/mopidy/config:/var/lib/mopidy/.config/
    ports:
    - 6600:6600
    - 6680:6680
#    network_mode: host
    devices:
    - /dev/snd:/dev/snd

After the container starts, I go into the config file and manually add the spotify username/password. When the container starts it look like everything is working great.

mopidy    | INFO     Starting Mopidy mixer: SoftwareMixer
mopidy    | INFO     Starting Mopidy audio
mopidy    | INFO     Starting Mopidy backends: YouTubeBackend, StreamBackend, M3UBackend, FileBackend, SpotifyBackend
mopidy    | INFO     Audio output set to "autoaudiosink"
mopidy    | INFO     Creating dir /var/lib/mopidy/.cache/mopidy/spotify
mopidy    | INFO     Creating dir /var/lib/mopidy/.local/share/mopidy/spotify
mopidy    | INFO     Starting Mopidy core
mopidy    | INFO     Starting Mopidy frontends: MpdFrontend, HttpFrontend
mopidy    | INFO     MPD server running at [::ffff:127.0.0.1]:6600
mopidy    | INFO     HTTP server running at [::ffff:127.0.0.1]:6680
mopidy    | INFO     Starting GLib mainloop
mopidy    | INFO     Logged in to Spotify in online mode

But when I open up spotify on the lan, I do not see the the client in my list. What am I doing wrong? Also is there a way to name the instance manually?

Thanks for the help

Problem after upgrade

I've been using yout docker-mopidy for at least 5 month without problems, from webserver, android client and home assistant.
Two days ago I've pull new image (includes iris, and is pretty), but home assistant stop working and I can only play music from browser on port 6680.
I can't see any error, but something has changed. Can you help me?

Error parsing reference: ":4713" is not a valid repository/tag.

Hi, I'm a docker newbie, I get this error message, when I try to run

$ docker run -d \
      -e PULSE_SERVER=tcp:$(hostname -i):4713 \
      -e PULSE_COOKIE_DATA=$(pax11publish -d | grep --color=never -Po '(?<=^Cookie: ).*') \
      -v $PWD/media:/var/lib/mopidy/media:ro \
      -v $PWD/local:/var/lib/mopidy/local \
      -p 6600:6600 -p 6680:6680 \
      wernight/mopidy \
      mopidy \
      -o spotify/username=USERNAME -o spotify/password=PASSWORD \
      -o gmusic/username=USERNAME -o gmusic/password=PASSWORD \
      -o soundcloud/auth_token=TOKEN

Pandroa and gmusic extensions don't work due to dependency issues

Logs from startup:

INFO     Disabled extension pandora: (cryptography 1.7.1 (/usr/lib/python2.7/dist-packages), Requirement.parse('cryptography<3,>=2'), set(['pydora']))
INFO     Disabled extension gmusic: (pyasn1 0.1.9 (/usr/lib/python2.7/dist-packages), Requirement.parse('pyasn1<0.5.0,>=0.4.1'), set(['pyasn1-modules']))

Cannot build container because of python-pykka dependency

Hi there, I just tried to build your container using:

sudo docker build .

but I get the following error:

+ DEBIAN_FRONTEND=noninteractive apt-get install -y mopidy mopidy-soundcloud mopidy-spotify
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 mopidy : Depends: python-pykka but it is not going to be installed
 mopidy-soundcloud : Depends: python-pykka but it is not going to be installed
 mopidy-spotify : Depends: python-pykka but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
The command '/bin/sh -c set -ex  && apt-get update  && apt-get upgrade  && DEBIAN_FRONTEND=noninteractive apt-get install -y         curl         dumb-init         gcc         gnupg         gstreamer1.0-alsa         gstreamer1.0-plugins-bad         python-crypto  && curl -L https://apt.mopidy.com/mopidy.gpg | apt-key add -  && curl -L https://apt.mopidy.com/mopidy.list -o /etc/apt/sources.list.d/mopidy.list  && apt-get update  && DEBIAN_FRONTEND=noninteractive apt-get install -y         mopidy         mopidy-soundcloud         mopidy-spotify  && curl -L https://bootstrap.pypa.io/get-pip.py | python -  && pip install -U six pyasn1 requests[security] cryptography  && pip install         Mopidy-Iris         Mopidy-Moped         Mopidy-GMusic         Mopidy-Pandora         Mopidy-YouTube         pyopenssl         youtube-dl  && mkdir -p /var/lib/mopidy/.config  && ln -s /config /var/lib/mopidy/.config/mopidy  && apt-get purge --auto-remove -y         curl         gcc  && apt-get clean  && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ~/.cache' returned a non-zero code: 100

Any clue what this is about?

Spotify Does Not Work

The spotify plugin does not work. A permissions change removes its access to the cache directory

INFO     Creating dir /var/cache/mopidy/spotify
ERROR    Unhandled exception in SpotifyBackend (urn:uuid:41aa8442-d6ec-4891-8917-c3f2cdb80a62):
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 192, in _actor_loop
    self.on_start()
  File "/usr/lib/python2.7/dist-packages/mopidy_spotify/backend.py", line 54, in on_start
    self._session = self._get_session(self._config)
  File "/usr/lib/python2.7/dist-packages/mopidy_spotify/backend.py", line 76, in _get_session
    session = spotify.Session(self._get_spotify_config(config))
  File "/usr/lib/python2.7/dist-packages/mopidy_spotify/backend.py", line 104, in _get_spotify_config
    spotify_config.cache_location = ext.get_cache_dir(config)
  File "/usr/lib/python2.7/dist-packages/mopidy/ext.py", line 75, in get_cache_dir
    path.get_or_create_dir(cache_dir_path)
  File "/usr/lib/python2.7/dist-packages/mopidy/internal/path.py", line 31, in get_or_create_dir
    os.makedirs(dir_path, 0o755)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/var/cache/mopidy/spotify'

This PR fixes it as well as alsa audio.
#20

Problems with running docker-mopidy

So I started with running the docker command: (I want use mopidy to stream Spotify)

docker run -dit \
> wernight/mopidy \
> mopidy \
> -o spotify/username=MyUsername -o spotify/password=MyPassword

Then it loaded the image, and ran the container.

Unfortunately, every time I run the container in detached -d like above, it automatically stops immediately.

When I run it without detached just with -it It throws the error:

/bin/bash: /entrypoint.sh: Permission denied

Does anyone of you know why this keeps happening?
Do I need to configure something or did I miss something? Thanks

Attempting to run container fails with docker not found

I tried to run your sample command with my spotify and soundcloud credentials and I get an error in the entrypoint.sh file on line 9 saying docker not found. So I think it seems to be running the docker run command that I used to try and run the container.

So I am wondering why the entrypoint.sh file has exec "$@", I see previously it was the mopidy command.

Can't build the image on a raspberry pi

Hi!

I am trying to build this image on a raspberry pi 3 (rasbian), but the process gets stuck at the Dockerfile instruction:

RUN set -ex \
 && pipenv install --system --deploy --python=$(which python3)

This tosses a generic error which is not very interesting. However, if I open a bash shell into the container and I try to install manually the first package that fails with $ pip install cffi==1.14.1 I get this:

root@1f49095b4292:/# pip install cffi==1.14.1
WARNING: The directory '/var/lib/mopidy/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting cffi==1.14.1
  Downloading cffi-1.14.1.tar.gz (468 kB)
     |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 468 kB 1.2 MB/s 
Collecting pycparser
  Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
     |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 112 kB 1.6 MB/s 
Building wheels for collected packages: cffi
  Building wheel for cffi (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_amf63jg/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_amf63jg/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-qwlnbq_k
       cwd: /tmp/pip-install-_amf63jg/cffi/
  Complete output (48 lines):
  unable to execute 'arm-linux-gnueabihf-gcc': No such file or directory
  unable to execute 'arm-linux-gnueabihf-gcc': No such file or directory
  
      No working compiler found, or bogus compiler options passed to
      the compiler from Python's standard "distutils" module.  See
      the error messages above.  Likely, the problem is not related
      to CFFI but generic to the setup.py of any Python package that
      tries to compile C code.  (Hints: on OS/X 10.8, for errors about
      -mno-fused-madd see http://stackoverflow.com/questions/22313407/
      Otherwise, see https://wiki.python.org/moin/CompLangPython or
      the IRC channel #python on irc.freenode.net.)
  
      Trying to continue anyway.  If you are trying to install CFFI from
      a build done in a different context, you can ignore this warning.
  
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-armv7l-3.7
  creating build/lib.linux-armv7l-3.7/cffi
  copying cffi/commontypes.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/pkgconfig.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/api.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/ffiplatform.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/recompiler.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/setuptools_ext.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/model.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/vengine_gen.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/vengine_cpy.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/backend_ctypes.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/__init__.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/lock.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/verifier.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/cparser.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/error.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/cffi_opcode.py -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/_cffi_include.h -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/parse_c_type.h -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/_embedding.h -> build/lib.linux-armv7l-3.7/cffi
  copying cffi/_cffi_errors.h -> build/lib.linux-armv7l-3.7/cffi
  running build_ext
  building '_cffi_backend' extension
  creating build/temp.linux-armv7l-3.7
  creating build/temp.linux-armv7l-3.7/c
  arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-armv7l-3.7/c/_cffi_backend.o
  unable to execute 'arm-linux-gnueabihf-gcc': No such file or directory
  error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for cffi
  Running setup.py clean for cffi
Failed to build cffi
DEPRECATION: Could not build wheels for cffi which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
Installing collected packages: pycparser, cffi
    Running setup.py install for cffi ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_amf63jg/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_amf63jg/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-69bt8n_3/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7/cffi
         cwd: /tmp/pip-install-_amf63jg/cffi/
    Complete output (48 lines):
    unable to execute 'arm-linux-gnueabihf-gcc': No such file or directory
    unable to execute 'arm-linux-gnueabihf-gcc': No such file or directory
    
        No working compiler found, or bogus compiler options passed to
        the compiler from Python's standard "distutils" module.  See
        the error messages above.  Likely, the problem is not related
        to CFFI but generic to the setup.py of any Python package that
        tries to compile C code.  (Hints: on OS/X 10.8, for errors about
        -mno-fused-madd see http://stackoverflow.com/questions/22313407/
        Otherwise, see https://wiki.python.org/moin/CompLangPython or
        the IRC channel #python on irc.freenode.net.)
    
        Trying to continue anyway.  If you are trying to install CFFI from
        a build done in a different context, you can ignore this warning.
    
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-armv7l-3.7
    creating build/lib.linux-armv7l-3.7/cffi
    copying cffi/commontypes.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/pkgconfig.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/api.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/ffiplatform.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/recompiler.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/setuptools_ext.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/model.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/vengine_gen.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/vengine_cpy.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/backend_ctypes.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/__init__.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/lock.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/verifier.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/cparser.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/error.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/cffi_opcode.py -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/_cffi_include.h -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/parse_c_type.h -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/_embedding.h -> build/lib.linux-armv7l-3.7/cffi
    copying cffi/_cffi_errors.h -> build/lib.linux-armv7l-3.7/cffi
    running build_ext
    building '_cffi_backend' extension
    creating build/temp.linux-armv7l-3.7
    creating build/temp.linux-armv7l-3.7/c
    arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/ffi -I/usr/include/libffi -I/usr/include/python3.7m -c c/_cffi_backend.c -o build/temp.linux-armv7l-3.7/c/_cffi_backend.o
    unable to execute 'arm-linux-gnueabihf-gcc': No such file or directory
    error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_amf63jg/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_amf63jg/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-69bt8n_3/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.7/cffi Check the logs for full command output.

Any thoughts?
Thanks!!

mopidy does not use /config/mopidy.conf

I just tried this docker image, it works fine except that the configuration file at /config/mopidy.conf is ignored, and instead it uses /var/lib/mopidy/.config/mopidy/mopidy.conf

`

Push updated image to Dockerhub

I see a fix has been committed to fix Youtube search, but this change hasn't made it to the image on Dockerhub yet. Could you please update it so I don't have to build the image from git? ๐Ÿ˜…

PulseAudio over network test fails

Hi, I tested the container on my Ubuntu system with /dev/snd and it works correctly but when trying the PulseAudio over network it logs some errors/warnings and it doesn't play anything:

AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
Pipeline is PREROLLING ...
WARNING: from element /GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0: Failed to connect: Connection refused
Additional debug info:
pulsesink.c(615): gst_pulseringbuffer_open_device (): /GstPulseSink:autoaudiosink0-actual-sink-pulse
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

What can be the problem?

pykka issue since last update

Hey,

Ever since the latest update to this repo I seem to be getting this error when starting the docker and I can't load the front end.

Unhandled exception in IrisFrontend (urn:uuid:e62a6bfa-b0b7-4629-b32c-f16344234e9f): Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pykka/_actor.py", line 186, in _actor_loop self.on_start() File "/usr/local/lib/python3.7/dist-packages/mopidy_iris/frontend.py", line 20, in on_start iris.start() File "/usr/local/lib/python3.7/dist-packages/mopidy_iris/core.py", line 63, in start self.data["commands"] = self.load_from_file("commands") File "/usr/local/lib/python3.7/dist-packages/mopidy_iris/core.py", line 79, in load_from_file file_path = Extension.get_data_dir(self.config) / ("%s.pkl" % name) File "/usr/lib/python3/dist-packages/mopidy/ext.py", line 113, in get_data_dir path.get_or_create_dir(data_dir_path) File "/usr/lib/python3/dist-packages/mopidy/internal/path.py", line 23, in get_or_create_dir dir_path.mkdir(mode=0o755, parents=True) File "/usr/lib/python3.7/pathlib.py", line 1251, in mkdir self._accessor.mkdir(self, mode) PermissionError: [Errno 13] Permission denied: '/var/lib/mopidy/.local/share/mopidy/iris' INFO 2021-02-22 16:36:55,129 [6:HttpServer] mopidy.internal.path Creating dir file:///var/lib/mopidy/.local/share/mopidy/http

Cheers

arm64 image

Related to #33

arm64 is the current standard as of the Pi 4, also supported on the Pi 3.
Thanks either way for considering

Potential disclose of music backend credentials

When specifying spotify/gmusic/etc username and credentials via the docker run command line as suggested by the README, the credentials will be visible for anyone on the host that is able to run a simple ps command. This may or may not be a problem for the users - possibly worth a warning in the README anyway.

Repeating the same song over and over

I've got mopidy set up with the following config:

[core]
data_dir = /var/lib/mopidy
[local]
media_dir = /var/lib/mopidy/media
[audio]
output = audioresample ! audioconvert ! vorbisenc ! oggmux ! shout2send async=false mount=stream.ogg ip=icecast port=8000 password=[redacted]
[m3u]
playlists_dir = /var/lib/mopidy/playlists
[http]
hostname = 0.0.0.0
[mpd]
hostname = 0.0.0.0
[spotify]
username=[redacted]
password = [redacted]
client_id = [redacted]
client_secret = [redacted]
[gmusic]
enabled=false
[soundcloud]
enabled=false
[pandora]
enabled=false

Mopidy works, I am able to access the web interface/iris, and successfully pull up my Spotify stuff. When I play, it does stream to icecast correctly. But it only repeats whatever song I play, never moves to the next item in the queue.

For reference, here's my playback screen:
image

In this case, it just replays "First Dates" over and over, until I skip to the next song, at which point it ends/restarts the stream to Icecast with a new song, which it repeats over and over.

Did I configure something incorrectly?

extension mopidy-api-explorer requires mopidy version >= 3.1.1

I would like to use extension mopidy-api-explorer

I managed to get it installed by docker command (ignore mopidy-local and git+https://github.com/antosart/mopidy-cd.git)

RUN python3 -m pip install cffi==1.12.2 mopidy-local git+https://github.com/mopidy/mopidy-api-explorer.git  git+https://github.com/antosart/mopidy-cd.git

But when the container becomes started it is logging:

mopidy_1        | INFO     2021-04-13 17:20:00,922 [7:MainThread] mopidy.ext
mopidy_1        |   Disabled extension api_explorer: Mopidy>=3.1.1 required, but found Mopidy 3.0.2 at /usr/lib/python3/dist-packages
mopidy_1        | INFO     2021-04-13 17:20:01,291 [7:MainThread] mopidy.__main__
mopidy_1        |   Enabled extensions: m3u, iris, spotify, softwaremixer, cd, moped, local, stream, http
mopidy_1        | INFO     2021-04-13 17:20:01,291 [7:MainThread] mopidy.__main__
mopidy_1        |   Disabled extensions: file, gmusic, pandora, youtube, api_explorer, soundcloud

Gmusic extension fails - dependency gpsoauth not installed

.... TL:DR I think I found the problem.
pipfile.lock has pinned version 1.0.0 which requires python 3.8
gpsoauth on April 2nd changed the minimum python version to 3.8.
docker-mopidy is currently running python 3.7.

Either the pinned version in the pipfile.lock needs changed to 0.4.3, or python version needs to be updated to minimum of 3.8.

Details below of my digging!
Thanks!
DeadEnd


Trying out Mopidy for the first time.
Fighting through config etc. and I have this error on container start:

ERROR    2021-12-13 13:55:16,203 [7:MainThread] mopidy.ext
  Setup of extension from entry point gmusic failed, ignoring extension.
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/mopidy/ext.py", line 234, in load_extensions
    command = extension.get_command()
  File "/usr/local/lib/python3.7/dist-packages/mopidy_gmusic/__init__.py", line 55, in get_command
    from .commands import GMusicCommand
  File "/usr/local/lib/python3.7/dist-packages/mopidy_gmusic/commands.py", line 1, in <module>
    import gmusicapi
  File "/usr/local/lib/python3.7/dist-packages/gmusicapi/__init__.py", line 2, in <module>
    from gmusicapi.clients import Webclient, Musicmanager, Mobileclient
  File "/usr/local/lib/python3.7/dist-packages/gmusicapi/clients/__init__.py", line 1, in <module>
    from gmusicapi.clients.webclient import Webclient
  File "/usr/local/lib/python3.7/dist-packages/gmusicapi/clients/webclient.py", line 9, in <module>
    import gmusicapi.session
  File "/usr/local/lib/python3.7/dist-packages/gmusicapi/session.py", line 9, in <module>
    import gpsoauth
ModuleNotFoundError: No module named 'gpsoauth'

Attaching to the container and pip install gpsoauth fixes this error.
I know gmusic is in the pipfile:

[packages]
youtube-dl = "*"
mopidy-iris = "*"
mopidy-moped = "*"
mopidy-gmusic = "*"
mopidy-pandora = "*"
mopidy-youtube = "*"
mopidy-local = "*"
mopidy-mpd = "*"
pyopenssl = "*"

Then checking the pipfile.lock file I see a pinned version:

        "gpsoauth": {
            "hashes": [
                "sha256:149c374863eec17cdac5279d57e4905592a9cd74cc34b7e58671cb19f9238f39",
                "sha256:1c4d6a980625b8ab6f6f1cf3e30d9b10a6c61ababb2b60bfe4870649e9c82be0"
            ],
            "markers": "python_version >= '3.8' and python_version < '4.0'",
            "version": "==1.0.0"
        },

But when I manually install gpsoauth it wants to use version 0.4.3... If I force 1.0.0 it fails:

$ pip install gpsoauth==1.0.0
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement gpsoauth==1.0.0 (from versions: 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.1.0, 0.2.0, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.4.3)
ERROR: No matching distribution found for gpsoauth==1.0.0

Version 1.0.0 exists and was released in April of this year.
Looking at the gpsoauth repo - it looks like right around the 1.0.0 release they changed the minimum python version to 3.8:
simon-weber/gpsoauth@6cffedc

I checked in the container and it is running python 3.7.
So - apologies for the long post... I'll do a TL:DR - but gpsoauth appears to fail to install due to minimum python version and the pinned version in the pipfile.lock.

Cheers!
Thanks!
DeadEnd

pyasn1 needs to be version 0.3.2 or later now

Otherwise starting gmusic plugin fails with an error

INFO Disabled extension gmusic: (pyasn1 0.1.8 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('pyasn1==0.3.2'), set(['pyasn1-modules']))

PermissionError: [Errno 13] Permission denied

Hi
I'm trying to run this docker with this composer:

  mopidy:
    container_name: mopidy
    image: wernight/mopidy
    volumes:
      - ${USERDIR}/kontit/mopidy/local:/var/lib/mopidy/local
      - ${USERDIR}/kontit/mopidy/config:/var/lib/mopidy/.config/
      - /run/user/{$PUID}/pulse:/run/user/105/pulse:ro
    ports:
      - 6600:6600
      - 6680:6680
    user: ${PUID}:${PGID}

But when I try to run it, I get this error in the logs:

Traceback (most recent call last):
  File "/usr/bin/mopidy", line 11, in <module>
    load_entry_point('Mopidy==3.1.1', 'console_scripts', 'mopidy')()
  File "/usr/lib/python3/dist-packages/mopidy/__main__.py", line 62, in main
    create_core_dirs(config)
  File "/usr/lib/python3/dist-packages/mopidy/__main__.py", line 157, in create_core_dirs
    path.get_or_create_dir(config["core"]["config_dir"])
  File "/usr/lib/python3/dist-packages/mopidy/internal/path.py", line 23, in get_or_create_dir
    dir_path.mkdir(mode=0o755, parents=True)
  File "/usr/lib/python3.7/pathlib.py", line 1251, in mkdir
    self._accessor.mkdir(self, mode)
PermissionError: [Errno 13] Permission denied: '/var/lib/mopidy/.config/mopidy'

The user is in the docker group and all the other container are working. Any idea what to do?

httpd output

How to run the container without pulseaudio but with httpd instead?

Example config:

#
# An example of a httpd output (built-in HTTP streaming server):
#
audio_output {
	type		"httpd"
	name		"My HTTP Stream"
	encoder		"lame"			# optional, vorbis or lame
	port		"8000"
	bind_to_address	"0.0.0.0"		# optional, IPv4 or IPv6
#	quality		"10.0"			# do not define if bitrate is defined
	bitrate		"256"			# do not define if quality is defined
	format		"44100:16:1"
	max_clients	"0"			# optional 0=no limit
}

Unable to build latest image

When attempting to build the docker image from latest git sources, I get the following output:

...
Step 13/18 : RUN /usr/bin/dumb-init /entrypoint.sh /usr/bin/mopidy --version
 ---> Running in 05c755cebdab
/entrypoint.sh: line 9: /usr/bin/mopidy: No such file or directory

I then opened a shell in the intermediate build image and discovered that the mopidy binary was located at /usr/local/bin/mopidy. After modifying the dockerfile to reflect this, I was able to successfully build the image.

Setting up audio output without X11

Have you had any luck setting up audio output for this container without X11? I'm trying to host this on Docker Cloud and serve via Icecast.

Using search stops the container

Hello,

every time I use the search feature of the web client, docker container stops.

Here's how I run mopidy:

docker run -d -e PULSE_SERVER=tcp:192.168.0.5:4713 -v $(pwd)/m
edia:/var/lib/mopidy/media:ro -v $(pwd)/local:/var/lib/mopidy/local -p 6600:6600 -p 6680:6680 
wernight/mopidy mopidy -v 

Tail of docker logs:

...
DEBUG    2017-02-19 18:21:46,597 [1:HttpServer] mopidy.http.handlers
  Received WebSocket message from 192.168.0.17: u'{"method":"core.library.search","params":{"any":["asdf"]},"jsonrpc":"2.0","id":56}'
INFO     2017-02-19 18:21:46,605 [1:YouTubeBackend-3] mopidy_youtube
  Searching YouTube for query 'asdf'

So it seems like youtube plugin is the issue.

Adding -o youtube/enabled=false fixes the issue, but I can't search for youtube videos:

docker run -d -e PULSE_SERVER=tcp:192.168.0.5:4713 -v $(pwd)/m
edia:/var/lib/mopidy/media:ro -v $(pwd)/local:/var/lib/mopidy/local -p 6600:6600 -p 6680:6680 
wernight/mopidy mopidy -v -o youtube/enabled=false

Looking through mopidy-youtube github issues (https://github.com/mopidy/mopidy-youtube/issues) there are many issues with its backed (pafy vs youtube-dl), but there are no reported crashes.

However, I confirmed that I can use pafy directly from inside the container:

# docker exec -it 4e24 /bin/sh
$ python
Python 2.7.9 (default, Jun 29 2016, 13:08:31) 
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pafy
>>> url = "https://www.youtube.com/watch?v=5Sb8I_hZPPc"
>>> video = pafy.new(url)
>>> video.title
u'Counterphase - Shapeless Ocean'

Here's the output of mopidy of a fresh container:

libudev: udev_has_devtmpfs: name_to_handle_at on /dev: Function not implemented
INFO     2017-02-19 18:26:36,504 [1:MainThread] mopidy.__main__
  Starting Mopidy 2.1.0
DEBUG    2017-02-19 18:26:36,600 [1:MainThread] mopidy.ext
  Loading entry point: youtube = mopidy_youtube:Extension
DEBUG    2017-02-19 18:26:36,601 [1:MainThread] mopidy.ext
  Loaded extension: Mopidy-YouTube 2.0.2
DEBUG    2017-02-19 18:26:36,603 [1:MainThread] mopidy.ext
  Loading entry point: moped = mopidy_moped:MopedExtension
DEBUG    2017-02-19 18:26:36,604 [1:MainThread] mopidy.ext
  Loaded extension: Mopidy-Moped 0.7.0
DEBUG    2017-02-19 18:26:36,606 [1:MainThread] mopidy.ext
  Loading entry point: gmusic = mopidy_gmusic:GMusicExtension
DEBUG    2017-02-19 18:26:36,607 [1:MainThread] mopidy.ext
  Loaded extension: Mopidy-GMusic 2.0.0
DEBUG    2017-02-19 18:26:36,611 [1:MainThread] mopidy.ext
  Loading entry point: mpd = mopidy.mpd:Extension
DEBUG    2017-02-19 18:26:36,612 [1:MainThread] mopidy.ext
  Loaded extension: Mopidy-MPD 2.1.0
DEBUG    2017-02-19 18:26:36,612 [1:MainThread] mopidy.ext
  Loading entry point: http = mopidy.http:Extension
DEBUG    2017-02-19 18:26:36,612 [1:MainThread] mopidy.ext
  Loaded extension: Mopidy-HTTP 2.1.0
DEBUG    2017-02-19 18:26:36,613 [1:MainThread] mopidy.ext
  Loading entry point: stream = mopidy.stream:Extension
DEBUG    2017-02-19 18:26:36,613 [1:MainThread] mopidy.ext
  Loaded extension: Mopidy-Stream 2.1.0
DEBUG    2017-02-19 18:26:36,613 [1:MainThread] mopidy.ext
  Loading entry point: m3u = mopidy.m3u:Extension
DEBUG    2017-02-19 18:26:36,614 [1:MainThread] mopidy.ext
  Loaded extension: Mopidy-M3U 2.1.0
DEBUG    2017-02-19 18:26:36,614 [1:MainThread] mopidy.ext
  Loading entry point: softwaremixer = mopidy.softwaremixer:Extension
DEBUG    2017-02-19 18:26:36,614 [1:MainThread] mopidy.ext
  Loaded extension: Mopidy-SoftwareMixer 2.1.0
DEBUG    2017-02-19 18:26:36,614 [1:MainThread] mopidy.ext
  Loading entry point: file = mopidy.file:Extension
DEBUG    2017-02-19 18:26:36,615 [1:MainThread] mopidy.ext
  Loaded extension: Mopidy-File 2.1.0
DEBUG    2017-02-19 18:26:36,615 [1:MainThread] mopidy.ext
  Loading entry point: local = mopidy.local:Extension
DEBUG    2017-02-19 18:26:36,619 [1:MainThread] mopidy.ext
  Loaded extension: Mopidy-Local 2.1.0
DEBUG    2017-02-19 18:26:36,621 [1:MainThread] mopidy.ext
  Loading entry point: spotify = mopidy_spotify:Extension
DEBUG    2017-02-19 18:26:36,622 [1:MainThread] mopidy.ext
  Loaded extension: Mopidy-Spotify 3.0.0
DEBUG    2017-02-19 18:26:36,624 [1:MainThread] mopidy.ext
  Loading entry point: soundcloud = mopidy_soundcloud:SoundCloudExtension
DEBUG    2017-02-19 18:26:36,625 [1:MainThread] mopidy.ext
  Loaded extension: Mopidy-SoundCloud 2.0.2
DEBUG    2017-02-19 18:26:36,631 [1:MainThread] mopidy.ext
  Discovered extensions: youtube, moped, gmusic, mpd, http, stream, m3u, softwaremixer, file, local, spotify, soundcloud
DEBUG    2017-02-19 18:26:36,634 [1:MainThread] mopidy.config.keyring
  Fetching passwords from your keyring failed. Any passwords stored in the keyring will not be available. (dbus not installed)
INFO     2017-02-19 18:26:36,634 [1:MainThread] mopidy.config
  Loading config from builtin defaults
DEBUG    2017-02-19 18:26:36,639 [1:MainThread] mopidy.config
  Loading config from /etc/xdg/mopidy/mopidy.conf failed; it does not exist
INFO     2017-02-19 18:26:36,640 [1:MainThread] mopidy.config
  Loading config from /var/lib/mopidy/.config/mopidy/mopidy.conf
INFO     2017-02-19 18:26:36,642 [1:MainThread] mopidy.config
  Loading config from command line options
INFO     2017-02-19 18:26:36,645 [1:MainThread] mopidy.internal.path
  Creating dir /var/lib/mopidy/.cache/mopidy
INFO     2017-02-19 18:26:36,645 [1:MainThread] mopidy.internal.path
  Creating dir /var/lib/mopidy/.local/share/mopidy
DEBUG    2017-02-19 18:26:36,650 [1:MainThread] mopidy.ext
  Validating extension: youtube
DEBUG    2017-02-19 18:26:36,688 [1:MainThread] mopidy.ext
  Validating extension: moped
DEBUG    2017-02-19 18:26:36,695 [1:MainThread] mopidy.ext
  Validating extension: gmusic
DEBUG    2017-02-19 18:26:36,843 [1:MainThread] mopidy.ext
  Validating extension: mpd
DEBUG    2017-02-19 18:26:36,844 [1:MainThread] mopidy.ext
  Validating extension: http
DEBUG    2017-02-19 18:26:36,872 [1:MainThread] mopidy.ext
  Validating extension: stream
DEBUG    2017-02-19 18:26:36,873 [1:MainThread] mopidy.ext
  Validating extension: m3u
DEBUG    2017-02-19 18:26:36,874 [1:MainThread] mopidy.ext
  Validating extension: softwaremixer
DEBUG    2017-02-19 18:26:36,876 [1:MainThread] mopidy.ext
  Validating extension: file
DEBUG    2017-02-19 18:26:36,877 [1:MainThread] mopidy.ext
  Validating extension: local
DEBUG    2017-02-19 18:26:36,878 [1:MainThread] mopidy.ext
  Validating extension: spotify
DEBUG    2017-02-19 18:26:36,890 [1:MainThread] mopidy.ext
  Validating extension: soundcloud
INFO     2017-02-19 18:26:36,897 [1:MainThread] mopidy.__main__
  Enabled extensions: mpd, http, file, stream, m3u, youtube, softwaremixer, moped, local
INFO     2017-02-19 18:26:36,897 [1:MainThread] mopidy.__main__
  Disabled extensions: spotify, gmusic, soundcloud
WARNING  2017-02-19 18:26:36,897 [1:MainThread] mopidy.__main__
  Found gmusic configuration errors, the extension has been automatically disabled:
WARNING  2017-02-19 18:26:36,897 [1:MainThread] mopidy.__main__
    gmusic/username must be set.
WARNING  2017-02-19 18:26:36,897 [1:MainThread] mopidy.__main__
    gmusic/password must be set.
WARNING  2017-02-19 18:26:36,898 [1:MainThread] mopidy.__main__
  Found soundcloud configuration errors, the extension has been automatically disabled:
WARNING  2017-02-19 18:26:36,898 [1:MainThread] mopidy.__main__
    soundcloud/auth_token must be set.
WARNING  2017-02-19 18:26:36,898 [1:MainThread] mopidy.__main__
  Found spotify configuration errors, the extension has been automatically disabled:
WARNING  2017-02-19 18:26:36,898 [1:MainThread] mopidy.__main__
    spotify/username must be set.
WARNING  2017-02-19 18:26:36,898 [1:MainThread] mopidy.__main__
    spotify/password must be set.
WARNING  2017-02-19 18:26:36,899 [1:MainThread] mopidy.__main__
  Please fix the extension configuration errors or disable the extensions to silence these messages.
DEBUG    2017-02-19 18:26:38,980 [1:MainThread] mopidy.commands
  Available Mopidy mixers: SoftwareMixer
INFO     2017-02-19 18:26:38,981 [1:MainThread] mopidy.commands
  Starting Mopidy mixer: SoftwareMixer
DEBUG    2017-02-19 18:26:38,983 [1:MainThread] mopidy.commands
  Mixer volume left unchanged
INFO     2017-02-19 18:26:38,984 [1:MainThread] mopidy.commands
  Starting Mopidy audio
INFO     2017-02-19 18:26:38,986 [1:MainThread] mopidy.commands
  Starting Mopidy backends: YouTubeBackend, StreamBackend, M3UBackend, FileBackend, LocalBackend
DEBUG    2017-02-19 18:26:39,010 [1:MainThread] mopidy.file.library
  Failed expanding path ($XDG_MUSIC_DIR) from file/media_dirs config value.
INFO     2017-02-19 18:26:39,015 [1:Audio-2] mopidy.audio.actor
  Audio output set to "autoaudiosink"
INFO     2017-02-19 18:26:39,016 [1:MainThread] mopidy.internal.path
  Creating dir /var/lib/mopidy/.local/share/mopidy/local
DEBUG    2017-02-19 18:26:39,017 [1:MainThread] mopidy.local.actor
  Using json as the local library
DEBUG    2017-02-19 18:26:39,017 [1:MainThread] mopidy.local.json
  Loading library: /var/lib/mopidy/.local/share/mopidy/local/library.json.gz
INFO     2017-02-19 18:26:39,017 [1:MainThread] mopidy.local.json
  No local library metadata cache found at /var/lib/mopidy/.local/share/mopidy/local/library.json.gz. Please run `mopidy local scan` to index your local music library. If you do not have a local music collection, you can disable the local backend to hide this message.
INFO     2017-02-19 18:26:39,019 [1:MainThread] mopidy.local.library
  Loaded 0 local tracks using json
INFO     2017-02-19 18:26:39,028 [1:MainThread] mopidy.commands
  Starting Mopidy core
INFO     2017-02-19 18:26:39,057 [1:MainThread] mopidy.commands
  Starting Mopidy frontends: MpdFrontend, HttpFrontend
INFO     2017-02-19 18:26:39,060 [1:MainThread] mopidy.mpd.actor
  MPD server running at [::ffff:0.0.0.0]:6600
DEBUG    2017-02-19 18:26:39,061 [1:MpdFrontend-9] mopidy.zeroconf
  Zeroconf service "None" (_mpd._tcp at []:6600): dbus not installed; publish failed.
DEBUG    2017-02-19 18:26:39,062 [1:MainThread] mopidy.http.actor
  Starting HTTP server
INFO     2017-02-19 18:26:39,064 [1:HttpFrontend-11] mopidy.http.actor
  HTTP server running at [::ffff:0.0.0.0]:6680
INFO     2017-02-19 18:26:39,064 [1:MainThread] mopidy.commands
  Starting GLib mainloop
DEBUG    2017-02-19 18:26:39,065 [1:HttpFrontend-11] mopidy.zeroconf
  Zeroconf service "None" (_http._tcp at []:6680): dbus not installed; publish failed.
DEBUG    2017-02-19 18:26:39,066 [1:HttpFrontend-11] mopidy.zeroconf
  Zeroconf service "None" (_mopidy-http._tcp at []:6680): dbus not installed; publish failed.
DEBUG    2017-02-19 18:26:39,065 [1:HttpServer] mopidy.http.actor
  Loaded HTTP extension: mopidy
DEBUG    2017-02-19 18:26:39,066 [1:HttpServer] mopidy.http.actor
  Loaded static HTTP extension: moped
DEBUG    2017-02-19 18:26:39,066 [1:HttpServer] mopidy.http.actor
  HTTP routes from extensions: 
    u'/mopidy': <class 'mopidy.http.handlers.AddSlashHandler'>
    u'/mopidy/ws/?': <class 'mopidy.http.handlers.WebSocketHandler'>
    u'/mopidy/rpc': <class 'mopidy.http.handlers.JsonRpcHandler'>
    u'/mopidy/(.+)': <class 'mopidy.http.handlers.StaticFileHandler'>
    u'/mopidy/': <class 'mopidy.http.handlers.ClientListHandler'>
    u'/moped': <class 'mopidy.http.handlers.AddSlashHandler'>
    u'/moped/(.*)': <class 'mopidy.http.handlers.StaticFileHandler'>
    u'/': <class 'tornado.web.RedirectHandler'>

I tried running mopidy with --save-debug-log but it immediately breaks:

# docker run -d -e PULSE_SERVER=tcp:192.168.0.5:4713 -
v $(pwd)/media:/var/lib/mopidy/media:ro -v $(pwd)/local:/var/lib/mopidy/local -p 6600:6600 -p 
6680:6680 mopidy2 mopidy -v --save-debug-log
8d7ad117adb29badbdb2d68929b008a7edc4d3c57b9f30571bf87546d5ef6f27

# docker logs 8d7a
libudev: udev_has_devtmpfs: name_to_handle_at on /dev: Function not implemented
ERROR    2017-02-19 18:28:35,560 [1:MainThread] mopidy.__main__
  [Errno 13] Permission denied: '/mopidy.log'
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/mopidy/__main__.py", line 68, in main
    log.setup_logging(config, verbosity_level, args.save_debug_log)
  File "/usr/lib/python2.7/dist-packages/mopidy/internal/log.py", line 68, in setup_logging
    setup_debug_logging_to_file(config)
  File "/usr/lib/python2.7/dist-packages/mopidy/internal/log.py", line 104, in setup_debug_logging_to_file
    config['logging']['debug_file'], maxBytes=10485760, backupCount=3)
  File "/usr/lib/python2.7/logging/handlers.py", line 117, in __init__
    BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib/python2.7/logging/handlers.py", line 64, in __init__
    logging.FileHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib/python2.7/logging/__init__.py", line 911, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python2.7/logging/__init__.py", line 936, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/mopidy.log'
Traceback (most recent call last):
  File "/usr/bin/mopidy", line 9, in <module>
    load_entry_point('Mopidy==2.1.0', 'console_scripts', 'mopidy')()
  File "/usr/lib/python2.7/dist-packages/mopidy/__main__.py", line 68, in main
    log.setup_logging(config, verbosity_level, args.save_debug_log)
  File "/usr/lib/python2.7/dist-packages/mopidy/internal/log.py", line 68, in setup_logging
    setup_debug_logging_to_file(config)
  File "/usr/lib/python2.7/dist-packages/mopidy/internal/log.py", line 104, in setup_debug_logging_to_file
    config['logging']['debug_file'], maxBytes=10485760, backupCount=3)
  File "/usr/lib/python2.7/logging/handlers.py", line 117, in __init__
    BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib/python2.7/logging/handlers.py", line 64, in __init__
    logging.FileHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib/python2.7/logging/__init__.py", line 911, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python2.7/logging/__init__.py", line 936, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/mopidy.log'
INFO     2017-02-19 18:28:35,417 [1:MainThread] mopidy.__main__
  Starting Mopidy 2.1.0
DEBUG    2017-02-19 18:28:35,513 [1:MainThread] mopidy.ext
  Loading entry point: youtube = mopidy_youtube:Extension
DEBUG    2017-02-19 18:28:35,515 [1:MainThread] mopidy.ext
  Loaded extension: Mopidy-YouTube 2.0.2
DEBUG    2017-02-19 18:28:35,517 [1:MainThread] mopidy.ext
  Loading entry point: moped = mopidy_moped:MopedExtension
DEBUG    2017-02-19 18:28:35,518 [1:MainThread] mopidy.ext
  Loaded extension: Mopidy-Moped 0.7.0
DEBUG    2017-02-19 18:28:35,519 [1:MainThread] mopidy.ext
  Loading entry point: gmusic = mopidy_gmusic:GMusicExtension
DEBUG    2017-02-19 18:28:35,520 [1:MainThread] mopidy.ext
  Loaded extension: Mopidy-GMusic 2.0.0
DEBUG    2017-02-19 18:28:35,525 [1:MainThread] mopidy.ext
  Loading entry point: mpd = mopidy.mpd:Extension
DEBUG    2017-02-19 18:28:35,525 [1:MainThread] mopidy.ext
  Loaded extension: Mopidy-MPD 2.1.0
DEBUG    2017-02-19 18:28:35,525 [1:MainThread] mopidy.ext
  Loading entry point: http = mopidy.http:Extension
DEBUG    2017-02-19 18:28:35,526 [1:MainThread] mopidy.ext
  Loaded extension: Mopidy-HTTP 2.1.0
DEBUG    2017-02-19 18:28:35,526 [1:MainThread] mopidy.ext
  Loading entry point: stream = mopidy.stream:Extension
DEBUG    2017-02-19 18:28:35,527 [1:MainThread] mopidy.ext
  Loaded extension: Mopidy-Stream 2.1.0
DEBUG    2017-02-19 18:28:35,527 [1:MainThread] mopidy.ext
  Loading entry point: m3u = mopidy.m3u:Extension
DEBUG    2017-02-19 18:28:35,527 [1:MainThread] mopidy.ext
  Loaded extension: Mopidy-M3U 2.1.0
DEBUG    2017-02-19 18:28:35,527 [1:MainThread] mopidy.ext
  Loading entry point: softwaremixer = mopidy.softwaremixer:Extension
DEBUG    2017-02-19 18:28:35,528 [1:MainThread] mopidy.ext
  Loaded extension: Mopidy-SoftwareMixer 2.1.0
DEBUG    2017-02-19 18:28:35,528 [1:MainThread] mopidy.ext
  Loading entry point: file = mopidy.file:Extension
DEBUG    2017-02-19 18:28:35,529 [1:MainThread] mopidy.ext
  Loaded extension: Mopidy-File 2.1.0
DEBUG    2017-02-19 18:28:35,529 [1:MainThread] mopidy.ext
  Loading entry point: local = mopidy.local:Extension
DEBUG    2017-02-19 18:28:35,533 [1:MainThread] mopidy.ext
  Loaded extension: Mopidy-Local 2.1.0
DEBUG    2017-02-19 18:28:35,535 [1:MainThread] mopidy.ext
  Loading entry point: spotify = mopidy_spotify:Extension
DEBUG    2017-02-19 18:28:35,536 [1:MainThread] mopidy.ext
  Loaded extension: Mopidy-Spotify 3.0.0
DEBUG    2017-02-19 18:28:35,537 [1:MainThread] mopidy.ext
  Loading entry point: soundcloud = mopidy_soundcloud:SoundCloudExtension
DEBUG    2017-02-19 18:28:35,539 [1:MainThread] mopidy.ext
  Loaded extension: Mopidy-SoundCloud 2.0.2
DEBUG    2017-02-19 18:28:35,545 [1:MainThread] mopidy.ext
  Discovered extensions: youtube, moped, gmusic, mpd, http, stream, m3u, softwaremixer, file, local, spotify, soundcloud
DEBUG    2017-02-19 18:28:35,547 [1:MainThread] mopidy.config.keyring
  Fetching passwords from your keyring failed. Any passwords stored in the keyring will not be available. (dbus not installed)
INFO     2017-02-19 18:28:35,548 [1:MainThread] mopidy.config
  Loading config from builtin defaults
DEBUG    2017-02-19 18:28:35,553 [1:MainThread] mopidy.config
  Loading config from /etc/xdg/mopidy/mopidy.conf failed; it does not exist
INFO     2017-02-19 18:28:35,553 [1:MainThread] mopidy.config
  Loading config from /var/lib/mopidy/.config/mopidy/mopidy.conf
INFO     2017-02-19 18:28:35,556 [1:MainThread] mopidy.config
  Loading config from command line options
INFO     2017-02-19 18:28:35,559 [1:MainThread] mopidy.internal.path
  Creating dir /var/lib/mopidy/.cache/mopidy
INFO     2017-02-19 18:28:35,559 [1:MainThread] mopidy.internal.path
  Creating dir /var/lib/mopidy/.local/share/mopidy
ERROR    2017-02-19 18:28:35,560 [1:MainThread] mopidy.__main__
  [Errno 13] Permission denied: '/mopidy.log'
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/mopidy/__main__.py", line 68, in main
    log.setup_logging(config, verbosity_level, args.save_debug_log)
  File "/usr/lib/python2.7/dist-packages/mopidy/internal/log.py", line 68, in setup_logging
    setup_debug_logging_to_file(config)
  File "/usr/lib/python2.7/dist-packages/mopidy/internal/log.py", line 104, in setup_debug_logging_to_file
    config['logging']['debug_file'], maxBytes=10485760, backupCount=3)
  File "/usr/lib/python2.7/logging/handlers.py", line 117, in __init__
    BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib/python2.7/logging/handlers.py", line 64, in __init__
    logging.FileHandler.__init__(self, filename, mode, encoding, delay)
  File "/usr/lib/python2.7/logging/__init__.py", line 911, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python2.7/logging/__init__.py", line 936, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/mopidy.log'

I also tried playing with mopidy-youtube dependencies but to no avail:

FROM wernight/mopidy

USER root
RUN apt-get update
RUN apt-get install -y  gstreamer0.10-plugins-bad

RUN pip uninstall -y pafy
RUN pip uninstall -y mopidy-youtube

RUN pip install youtube-dl
RUN pip install mopidy-youtube
USER mopidy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.