Browse Source

moved heredocs to files

Toastie 4 years ago
parent
commit
9c6de992cc
1 changed files with 8 additions and 29 deletions
  1. 8 29
      mopidy/Dockerfile.mopidy

+ 8 - 29
mopidy/Dockerfile.mopidy

@@ -1,36 +1,15 @@
 FROM arm32v6/alpine
 
+ADD mopidy.conf /home/mopidy/.config/mopidy/mopidy.conf
+ADD asound.conf /etc/asound.conf
+
 RUN adduser -S mopidy \
-  && apk add --no-cache py-pip mopidy gstreamer sudo \
+  && apk add --no-cache py-pip mopidy gstreamer sudo python-dev \
   && python3 -m pip install Mopidy-Iris \
   && python3 -m pip install Mopidy-MPD \
-  && ldconfig \
-  && wget https://www.ee.columbia.edu/~dpwe/sounds/music/africa-toto.wav -O ~/toto.wav \
-  && mkdir -p ~/.config/mopidy \
-  && cat <<EOF | tee ~/.config/mopidy/mopidy.conf
-[http]
-enabled = true
-hostname = ::
-port = 6680
-[mpd]
-hostname = ::
+  && python3 -m pip install Mopidy-Youtube \
+  && chown -R mopidy:mopidy /home/mopidy/
 
-[audio]
-mixer = software
-output = alsasink
-EOF
-&& cat <<EOF | tee /etc/asound.conf
-pcm.!default {
-        type plug
-        slave {
-                pcm "hw:1,0"
-        }
-}
+USER mopidy
 
-ctl.!default {
-        type hw
-        card 1
-}
-EOF
-&& 
-/usr/bin/mopidy &
+ENTRYPOINT ["/usr/bin/mopidy"]