forked from AlDemion/torrentmonitor-dockerized
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
59 lines (53 loc) · 3.06 KB
/
Dockerfile
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
#------------------------------------------------------------------------------
# Set the base image for subsequent instructions:
#------------------------------------------------------------------------------
FROM alpine:3.7
MAINTAINER Siarhei Navatski <[email protected]>, Andrey Aleksandrov <[email protected]>, Roman Smirnov <[email protected]>
#------------------------------------------------------------------------------
# Environment variables:
#------------------------------------------------------------------------------
ENV VERSION="1.7.7" \
RELEASE_DATE="06.08.2018" \
CRON_TIMEOUT="0 * * * *" \
PHP_TIMEZONE="UTC" \
PHP_MEMORY_LIMIT="512M"
#------------------------------------------------------------------------------
# Populate root file system:
#------------------------------------------------------------------------------
ADD rootfs /
#------------------------------------------------------------------------------
# Install:
#------------------------------------------------------------------------------
RUN echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& echo "@edge http://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories \
&& apk update \
&& apk upgrade \
&& apk --no-cache add --update -t deps wget unzip sqlite build-base tar re2c make file curl python2 python2-dev py2-pip \
&& apk --no-cache add nginx php7-common php7-cli php7-fpm php7-session php7-curl php7-sqlite3 php7-mysqli php7-pdo_sqlite php7-iconv php7-json php7-ctype php7-zip php7-xml php7-simplexml php7-mbstring \
&& apk add --no-cache boost-python@edge boost-system@edge libressl2.7-libcrypto@edge libressl2.7-libssl@edge \
&& apk add --no-cache deluge@testing \
&& pip install --no-cache-dir automat incremental constantly service_identity \
&& wget -q http://tormon.ru/tm-latest.zip -O /tmp/tm-latest.zip \
&& unzip /tmp/tm-latest.zip -d /tmp/ \
&& rm -f /tmp/TorrentMonitor-master/config.php \
&& mv /tmp/TorrentMonitor-master/* /data/htdocs \
&& cat /data/htdocs/db_schema/sqlite.sql | sqlite3 /data/htdocs/db_schema/tm.sqlite \
&& mkdir -p /var/log/nginx/ \
&& ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log \
&& ln -sf /dev/stdout /var/log/php-fpm.log \
&& apk del --purge deps; rm -rf /tmp/* /var/cache/apk/*
RUN apk add --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing gnu-libiconv
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php
#------------------------------------------------------------------------------
# Set labels:
#------------------------------------------------------------------------------
LABEL ru.korphome.version="${VERSION}" \
ru.korphome.release-date="${RELEASE_DATE}"
#------------------------------------------------------------------------------
# Set volumes, workdir, expose ports and entrypoint:
#------------------------------------------------------------------------------
VOLUME ["/data/htdocs/db", "/data/htdocs/torrents"]
WORKDIR /
EXPOSE 80
ENTRYPOINT ["/init"]