diff --git a/Dockerfile b/Dockerfile index 6521e1d..caf654f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,11 +7,7 @@ LABEL maintainer “Jonathan Ervine” architecture="x86_64" ENV LANG='en_US.UTF-8' \ LANGUAGE='en_US.UTF-8' \ TERM='xterm' \ - VERSION='master' \ - CP_USER='mediaservice' \ - CP_GROUP='mediaservice' \ - CP_UID='1003' \ - CP_GID='1003' + VERSION='master' RUN echo http://dl-4.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \ apk update && \ @@ -28,13 +24,11 @@ RUN wget https://github.com/CouchPotato/CouchPotatoServer/archive/$VERSION.tar.g rm -rf couchpotato.tar.gz && \ apk del make gcc g++ && \ rm -rf /tmp/src && \ - rm -rf /var/cache/apk/* && \ - addgroup -g $CP_GID $CP_GROUP && \ - adduser -D -u $CP_UID -G $CP_GROUP -H $CP_USER && \ - chown -R $CP_USER:$CP_GROUP /couchpotato + rm -rf /var/cache/apk/* + +COPY start.sh /usr/local/bin/start.sh EXPOSE 5050 -USER $CP_USER -CMD [ "/usr/bin/python2", "/couchpotato/CouchPotato.py", "--console_log", "--data_dir=/config" ] +CMD [ "/usr/local/bin/start.sh" ] diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..6431e71 --- /dev/null +++ b/start.sh @@ -0,0 +1,9 @@ +#!/bin/sh +# +## Script to kick off Couchpotato Movies media orgnaiser +# +addgroup -g $GID coucpotato +adduser -D -u $UID -G couchpotato -H couchpotato +chown -R $UID:$GID /couchpotato +su - $UID +/usr/bin/python2 /couchpotato/CouchPotato.py --console_log --data_dir=/config" ]