forked from klingtnet/docker-cherrymusic
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
38 lines (30 loc) · 968 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM alpine:3.6
MAINTAINER Andreas Linz "[email protected]"
# install requirements
RUN apk update &&\
apk add python3\
ffmpeg\
flac\
curl
RUN pip3 install --upgrade pip &&\
pip3 install cherrypy &&\
pip3 install cherrymusic==0.40.0
# set locale
ENV LANG en_US.UTF-8
ENV CM_USER cm
# create user that runs cherrymusic
RUN adduser -h /home/${CM_USER} -s /sbin/nologin -D ${CM_USER}
RUN su -s /bin/sh ${CM_USER} -c "mkdir -p \
~/.config/cherrymusic \
~/.local/share/cherrymusic \
~/basedir"
EXPOSE 8080
# mount your music folder into the basedir (docker run -v /path/to/music:/home/cm/basedir)
# and do the same for the config and share folder
VOLUME /home/${CM_USER}/.config/cherrymusic \
/home/${CM_USER}/.local/share/cherrymusic \
/home/${CM_USER}/basedir
COPY entrypoint.sh /
WORKDIR /home/${CM_USER}
CMD su -s /bin/sh -c 'cherrymusic' - ${CM_USER}
ENTRYPOINT ["/entrypoint.sh"]