FEATURE: Using static version of CouchPotato
This commit is contained in:
+18
-20
@@ -1,19 +1,6 @@
|
||||
FROM debian:8
|
||||
MAINTAINER Dominique Barton
|
||||
|
||||
#
|
||||
# Install all required dependencies.
|
||||
#
|
||||
|
||||
RUN apt-get -q update \
|
||||
&& apt-get install -qy git python-pip python-dev libz-dev libxml2-dev libxslt1-dev gcc \
|
||||
&& pip install cheetah lxml pyopenssl \
|
||||
&& apt-get -y remove python-dev libz-dev libxml2-dev libxslt1-dev gcc \
|
||||
&& apt-get -y autoremove \
|
||||
&& apt-get -y clean \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& rm -rf /tmp/*
|
||||
|
||||
#
|
||||
# Create user and group for CouchPotato.
|
||||
#
|
||||
@@ -21,13 +8,6 @@ RUN apt-get -q update \
|
||||
RUN groupadd -r -g 666 couchpotato \
|
||||
&& useradd -r -u 666 -g 666 -d /couchpotato couchpotato
|
||||
|
||||
#
|
||||
# Get CouchPotato repository.
|
||||
#
|
||||
|
||||
RUN git clone -b master https://github.com/RuudBurger/CouchPotatoServer.git /couchpotato \
|
||||
&& chown -R couchpotato: /couchpotato
|
||||
|
||||
#
|
||||
# Add CouchPotato init script.
|
||||
#
|
||||
@@ -35,6 +15,24 @@ RUN git clone -b master https://github.com/RuudBurger/CouchPotatoServer.git /cou
|
||||
ADD couchpotato.sh /couchpotato.sh
|
||||
RUN chmod 755 /couchpotato.sh
|
||||
|
||||
#
|
||||
# Install CouchPotato and all required dependencies.
|
||||
#
|
||||
|
||||
RUN export VERSION=3.0.1 \
|
||||
&& apt-get -q update \
|
||||
&& apt-get install -qy curl python-pip python-dev libz-dev libxml2-dev libxslt1-dev gcc \
|
||||
&& curl -o /tmp/couchpotato.tar.gz https://codeload.github.com/CouchPotato/CouchPotatoServer/tar.gz/build/${VERSION} \
|
||||
&& tar xzf /tmp/couchpotato.tar.gz \
|
||||
&& mv couchpotato-* couchpotato \
|
||||
&& chown -R couchpotato: couchpotato \
|
||||
&& pip install cheetah lxml pyopenssl \
|
||||
&& apt-get -y remove curl python-dev libz-dev libxml2-dev libxslt1-dev gcc \
|
||||
&& apt-get -y autoremove \
|
||||
&& apt-get -y clean \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& rm -rf /tmp/*
|
||||
|
||||
#
|
||||
# Define container settings.
|
||||
#
|
||||
|
||||
@@ -6,7 +6,6 @@ The Docker image currently supports:
|
||||
|
||||
* running CouchPotato under its __own user__ (not `root`)
|
||||
* changing of the __UID and GID__ for the CouchPotato user
|
||||
* __automatic update__ of CouchPotato on container restart
|
||||
* instant __switching between different CouchPotato versions__
|
||||
* support for OpenSSL / HTTPS encryption
|
||||
|
||||
@@ -64,18 +63,6 @@ If you want to change this you've to set the `CONFIG` environment variable, for
|
||||
CONFIG=/datadir/couchpotato.ini
|
||||
```
|
||||
|
||||
### CouchPotato Version
|
||||
|
||||
By default the latest CouchPotato version will be used. This is achieved by pointing at the `master` tree of the [CouchPotato git repository](https://github.com/RuudBurger/CouchPotatoServer/tree/master). If you want a different version you've set the `VERSION` environment variable to a valid git [branch](https://github.com/RuudBurger/CouchPotatoServer/branches) or [tag](https://github.com/RuudBurger/CouchPotatoServer/tags), for example:
|
||||
|
||||
```
|
||||
VERSION=devel
|
||||
```
|
||||
|
||||
Please note that `VERSION=master` always points to the latest stable version, while `VERSION=devel` points to the bleeding-edge version of CouchPotato.
|
||||
|
||||
_CouchPotato will automatically be updated and switched to your defined version when you restart your container._
|
||||
|
||||
### UID and GID
|
||||
|
||||
By default CouchPotato runs with user ID and group ID `666`.
|
||||
|
||||
@@ -15,7 +15,6 @@ echo " UID: ${CP_UID:=666}"
|
||||
echo " GID: ${CP_GID:=666}"
|
||||
echo
|
||||
echo " Config: ${CONFIG:=/datadir/config.ini}"
|
||||
echo " Version: ${VERSION:=master}"
|
||||
echo
|
||||
|
||||
#
|
||||
@@ -37,25 +36,6 @@ chown -R ${USER}: /couchpotato
|
||||
chown ${USER}: /datadir /media $(dirname ${CONFIG})
|
||||
echo "[DONE]"
|
||||
|
||||
#
|
||||
# Update CouchPotato and checkout requested version.
|
||||
#
|
||||
|
||||
printf "Updating CouchPotato git repository... "
|
||||
git pull -q
|
||||
echo "[DONE]"
|
||||
|
||||
printf "Getting current version... "
|
||||
CURRENT_VERSION=$(git rev-parse --abbrev-ref HEAD)
|
||||
echo "[${CURRENT_VERSION}]"
|
||||
|
||||
if [[ "${CURRENT_VERSION}" != "${VERSION}" ]]
|
||||
then
|
||||
printf "Checking out CouchPotato version '${VERSION}'... "
|
||||
git checkout -q ${VERSION}
|
||||
echo "[DONE]"
|
||||
fi
|
||||
|
||||
#
|
||||
# Finally, start CouchPotato.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user