-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile_alpine
79 lines (67 loc) · 1.71 KB
/
Dockerfile_alpine
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
ARG PYLOAD_VERSION='0.5.0b3.dev85'
ARG UNRAR_VERSION='6.2.12'
FROM digrouz/alpine-s6:latest as builder
ARG PYLOAD_VERSION
ARG UNRAR_VERSION
ENV PYLOAD_VERSION="${PYLOAD_VERSION}"\
UNRAR_VERSION="${UNRAR_VERSION}"
RUN set -x && \
apk upgrade --no-cache && \
apk add --no-cache --virtual=build-deps \
curl \
curl-dev \
gcc \
g++ \
make \
musl-dev \
py3-pip \
py3-virtualenv \
python3-dev \
&& \
cd /opt && \
virtualenv pyload && \
cd pyload && \
. bin/activate && \
pip --no-cache-dir install --upgrade \
pip \
setuptools \
wheel \
&& \
pip --no-cache-dir install --upgrade \
pyload-ng[all]==${PYLOAD_VERSION} \
&& \
curl -SsL https://www.rarlab.com/rar/unrarsrc-${UNRAR_VERSION}.tar.gz -o /tmp/unrar.tar.gz && \
cd /tmp && \
tar xzf /tmp/unrar.tar.gz && \
cd unrar && \
make -f makefile && \
chmod 755 unrar
FROM digrouz/alpine-s6:latest
LABEL maintainer "DI GREGORIO Nicolas <nicolas.digregorio@gmail.com>"
ARG PYLOAD_VERSION
ARG UNRAR_VERSION
### Environment variables
ENV PYLOAD_VERSION="${PYLOAD_VERSION}"\
UNRAR_VERSION="${UNRAR_VERSION}"
### Copy config files
COPY root/ /
COPY --from=builder /opt/pyload /opt/pyload
COPY --from=builder /tmp/unrar/unrar /usr/bin/unrar
### Install Application
RUN set -x && \
apk --no-cache upgrade && \
chown -R appuser /opt/pyload && \
apk add --no-cache --virtual=run-deps \
libcurl \
mailx \
python3 \
ssmtp \
unzip \
&& \
rm -rf /tmp/* \
/var/cache/apk/* \
/var/tmp/*
### Volume
VOLUME ["/downloads","/config","/temporary-downloads"]
### Expose ports
EXPOSE 8000 7227 9666