1
0
Fork 0
mirror of https://github.com/imtbl/hydrus-server-docker synced 2024-05-20 04:23:37 +12:00
hydrus-server-docker/Dockerfile

75 lines
1.6 KiB
Docker
Raw Normal View History

2019-01-20 02:51:48 +13:00
FROM python:3.7-alpine
2018-11-30 04:49:02 +13:00
ARG HOST_USER_ID=1000
ARG HOST_GROUP_ID=1000
ENV HOST_USER_ID=$HOST_USER_ID
ENV HOST_GROUP_ID=$HOST_GROUP_ID
RUN \
if [ $(getent group ${HOST_GROUP_ID}) ]; then \
2019-01-20 02:51:48 +13:00
adduser -D -u ${HOST_USER_ID} hydrus; \
2018-11-30 04:49:02 +13:00
else \
2019-01-20 02:51:48 +13:00
addgroup -g ${HOST_GROUP_ID} hydrus && \
adduser -D -u ${HOST_USER_ID} -G hydrus hydrus; \
2018-11-30 04:49:02 +13:00
fi
WORKDIR /usr/src/app
2019-02-10 12:29:35 +13:00
COPY ./hydrus .
2019-01-20 02:51:48 +13:00
RUN \
2018-12-03 02:14:33 +13:00
chown -R hydrus:hydrus /usr/src/app && \
2019-01-20 02:51:48 +13:00
chmod +x server.py && \
chmod +x bin/swfrender_linux bin/upnpc_linux && \
rm \
bin/swfrender_osx \
bin/swfrender_win32.exe \
bin/upnpc_osx \
bin/upnpc_win32.exe && \
2018-12-03 02:14:33 +13:00
mkdir /data && chown -R hydrus:hydrus /data && \
2019-01-20 02:51:48 +13:00
apk --no-cache add \
build-base \
ffmpeg \
jpeg-dev \
libffi-dev \
linux-headers \
openssl \
2019-02-10 12:29:35 +13:00
openssl-dev \
zlib-dev && \
2019-01-20 02:51:48 +13:00
pip install virtualenv && \
virtualenv venv && \
source venv/bin/activate && \
pip install \
beautifulsoup4~=4.7.1 \
lz4~=2.1.6 \
2019-04-26 00:30:05 +12:00
numpy~=1.16.3 \
2019-01-20 02:51:48 +13:00
pillow~=5.4.1 \
psutil~=5.4.8 \
pylzma~=0.5.0 \
pyopenssl~=18.0.0 \
pyyaml~=3.13 \
requests~=2.21.0 \
send2trash~=1.5.0 \
service_identity~=18.1.0 \
twisted~=18.9.0 && \
rm -r ~/.cache && \
2019-02-10 12:29:35 +13:00
apk del build-base jpeg-dev libffi-dev linux-headers openssl-dev zlib-dev
2018-11-30 04:49:02 +13:00
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint
RUN chmod +x /usr/local/bin/docker-entrypoint
EXPOSE 45870/tcp
EXPOSE 45871/tcp
EXPOSE 45872/tcp
2019-03-05 06:54:28 +13:00
HEALTHCHECK --interval=1m --timeout=10s --retries=3 \
CMD wget --quiet --tries=1 --no-check-certificate --spider \
https://localhost:45870 || exit 1
2019-03-25 00:53:53 +13:00
VOLUME /data
2018-11-30 04:49:02 +13:00
USER hydrus
ENTRYPOINT ["docker-entrypoint"]