diff --git a/Dockerfile b/Dockerfile index e78ba0b..eac984c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,44 +1,31 @@ -FROM python:2.7-alpine +FROM python:2.7 MAINTAINER Sami Haahtinen -ENV SICKGEAR_VERSION 0.12.2 +ENV GOSU_VERSION 1.9 +ENV SICKGEAR_VERSION 0.12.5 # Download gosu and SickGear. -RUN apk add --update \ - ca-certificates \ - curl \ - gcc \ - gnupg \ - libxml2 \ - libxml2-dev \ - libxslt \ - libxslt-dev \ - musl-dev \ - tzdata \ +RUN set -x \ + && apt-get update && apt-get install -y --no-install-recommends ca-certificates wget curl libxml2-dev libxslt-dev \ + && rm -rf /var/lib/apt/lists/* \ + && dpkgArch="$(dpkg --print-architecture | awk -F- '{ print $NF }')" \ + && wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch" \ + && wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-$dpkgArch.asc" \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \ + && gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu \ + && rm -r "$GNUPGHOME" /usr/local/bin/gosu.asc \ + && chmod +x /usr/local/bin/gosu \ + && gosu nobody true \ && \ - gpg --keyserver pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 && \ - ARCH=`uname -m`; if [ $ARCH == "x86_64" ]; then export ARCH="amd64"; else export ARCH="i386"; fi && \ - curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/1.6/gosu-$ARCH" && \ - curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/1.6/gosu-$ARCH.asc" && \ - gpg --verify /usr/local/bin/gosu.asc && \ - rm /usr/local/bin/gosu.asc && \ - chmod +x /usr/local/bin/gosu && \ - mkdir /opt && \ curl -SL "https://github.com/SickGear/SickGear/archive/release_${SICKGEAR_VERSION}.tar.gz" | \ tar xz -C /opt && \ mv /opt/SickGear-release_${SICKGEAR_VERSION} /opt/SickGear && \ pip install --no-cache-dir lxml && \ - pip install --no-cache-dir -r /opt/SickGear/requirements.txt && \ - apk del \ - ca-certificates \ - curl \ - gcc \ - gnupg \ - libxml2-dev \ - libxslt-dev \ - musl-dev \ - && \ - rm -rf /var/cache/apk/* + pip install --no-cache-dir -r /opt/SickGear/requirements.txt \ + && rm -rf /var/lib/apt/lists/* + + ENV APP_DATA="/data" PATH=/opt/SickGear:$PATH