Skip to content

Commit 4aea1f6

Browse files
author
needo
committed
Migrate to phusion and enable edge mode
1 parent 110ac45 commit 4aea1f6

File tree

4 files changed

+38
-6
lines changed

4 files changed

+38
-6
lines changed

Dockerfile

+16-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
FROM debian:jessie
1+
FROM phusion/baseimage:0.9.11
22
MAINTAINER needo <[email protected]>
33
ENV DEBIAN_FRONTEND noninteractive
44

5+
# Set correct environment variables
6+
ENV HOME /root
7+
8+
# Use baseimage-docker's init system
9+
CMD ["/sbin/my_init"]
10+
511
# Fix a Debianism of the nobody's uid being 65534
612
RUN usermod -u 99 nobody
713
RUN usermod -g 100 nobody
@@ -28,7 +34,12 @@ VOLUME /downloads
2834
# Movies directory
2935
VOLUME /movies
3036

31-
# Because running things as root is wrong
32-
USER nobody
33-
ENTRYPOINT ["python", "/opt/couchpotato/CouchPotato.py"]
34-
CMD ["--config_file=/config/config.ini", "--data_dir=/config/data"]
37+
# Add edge.sh to execute during container startup
38+
RUN mkdir -p /etc/my_init.d
39+
ADD edge.sh /etc/my_init.d/edge.sh
40+
RUN chmod +x /etc/my_init.d/edge.sh
41+
42+
# Add CouchPotato to runit
43+
RUN mkdir /etc/service/couchpotato
44+
ADD couchpotato.sh /etc/service/couchpotato/run
45+
RUN chmod +x /etc/service/couchpotato/run

README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
This is a Dockerfile setup for couchpotato - https://couchpota.to/
22

3-
To run:
3+
By default this Docker installs the latest stable version of CouchPotato:
44

55
docker run -d --net="host" --name="couchpotato" -v /path/to/couchpotato/data:/config -v /path/to/downloads:/downloads -v /path/to/movies:/movies -v /etc/localtime:/etc/localtime:ro -p 5050:5050 needo/couchpotato
6+
7+
Edge
8+
----
9+
If you would like to run the latest updates from the master branch as well as enable in-app updates run:
10+
11+
docker run -d --net="host" --name="couchpotato" -v /path/to/couchpotato/data:/config -v /path/to/downloads:/download
12+
s -v /path/to/movies:/movies -v /etc/localtime:/etc/localtime:ro -e EDGE=1 -p 5050:5050 needo/couchpotato

couchpotato.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
exec /sbin/setuser nobody python /opt/couchpotato/CouchPotato.py --config_file=/config/config.ini --data_dir=/config/data

edge.sh

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
# Does the user want the latest version
4+
if [ -z "$EDGE" ]; then
5+
echo "Bleeding edge not requested"
6+
else
7+
apt-get install -qy git
8+
rm -rf /opt/couchpotato
9+
git clone https://github.com/RuudBurger/CouchPotatoServer.git /opt/couchpotato
10+
chown -R nobody:users /opt/couchpotato
11+
fi

0 commit comments

Comments
 (0)