From c231e3875f464cb97bb911299130d3285fd72fac Mon Sep 17 00:00:00 2001 From: Dominique Barton Date: Sat, 19 Dec 2015 20:42:33 +0100 Subject: [PATCH] better handling of homedir and signal delegation --- Dockerfile | 4 ++-- start.sh | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0ce425f..1039332 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ RUN apt-get -q update \ && rm -rf /tmp/* RUN groupadd -r -g 666 couchpotato \ - && useradd -r -u 666 -g 666 couchpotato + && useradd -r -u 666 -g 666 -d /couchpotato couchpotato RUN git clone https://github.com/RuudBurger/CouchPotatoServer.git /couchpotato \ && chown -R couchpotato: /couchpotato @@ -25,4 +25,4 @@ EXPOSE 8080 USER couchpotato WORKDIR /couchpotato -CMD /start.sh +CMD ["/start.sh"] diff --git a/start.sh b/start.sh index 1c7474d..0fc2bf0 100644 --- a/start.sh +++ b/start.sh @@ -1,4 +1,7 @@ #!/bin/sh -cd /couchpotato + +echo 'Updating CouchPotato...' git pull -./CouchPotato.py --data_dir=/datadir --config_file=/datadir/config.ini + +echo 'Starting CouchPotato...' +exec ./CouchPotato.py --data_dir=/datadir --config_file=/datadir/config.ini