2015-06-07 07:08:01 +02:00
|
|
|
# Music player daemon
|
|
|
|
#
|
|
|
|
# docker run -d \
|
2015-06-07 09:34:24 +02:00
|
|
|
# --device /dev/snd \
|
2015-06-07 07:08:01 +02:00
|
|
|
# -v /etc/localtime:/etc/localtime:ro \
|
|
|
|
# -v $HOME/.mpd:/var/lib/mpd \
|
|
|
|
# -p 6600:6600 \
|
|
|
|
# --name mpd \
|
|
|
|
# jess/mpd
|
|
|
|
#
|
|
|
|
FROM debian:sid
|
|
|
|
MAINTAINER Jessica Frazelle <jess@docker.com>
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
mpd \
|
2015-06-07 09:34:24 +02:00
|
|
|
nfs-common \
|
|
|
|
sudo \
|
2015-06-07 07:08:01 +02:00
|
|
|
--no-install-recommends \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
run mkdir -p /var/lib/mpd/playlists \
|
|
|
|
&& mkdir -p /var/lib/mpd/music \
|
|
|
|
&& touch /var/lib/mpd/state \
|
|
|
|
&& touch /var/lib/mpd/tag_cache \
|
|
|
|
&& chmod 0777 -R /var/lib/mpd \
|
|
|
|
&& chown -R mpd /var/lib/mpd
|
|
|
|
|
2015-06-07 09:34:24 +02:00
|
|
|
# my user needs the ability to mount
|
2015-06-07 16:12:11 +02:00
|
|
|
# because all my music is in a nfs mount
|
2015-06-07 09:34:24 +02:00
|
|
|
RUN echo "mpd ALL=NOPASSWD: /usr/bin/mount, /sbin/mount.nfs, /usr/bin/umount" >> /etc/sudoers
|
2015-06-07 07:08:01 +02:00
|
|
|
|
|
|
|
ENV HOME /home/mpd
|
|
|
|
COPY mpd.conf /etc/mpd.conf
|
|
|
|
COPY mpd.sh /usr/local/bin/mpd.sh
|
|
|
|
|
|
|
|
WORKDIR $HOME
|
|
|
|
USER mpd
|
|
|
|
|
|
|
|
ENTRYPOINT [ "/usr/local/bin/mpd.sh" ]
|