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

81 lines
1.8 KiB
Docker
Raw Normal View History

FROM python:3.7-slim-buster
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 \
useradd -r -u ${HOST_USER_ID} hydrus; \
2018-11-30 04:49:02 +13:00
else \
groupadd -g ${HOST_GROUP_ID} hydrus && \
useradd -r -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 .
COPY ./deb .
2019-02-10 12:29:35 +13:00
2019-01-20 02:51:48 +13:00
RUN \
2018-12-03 02:14:33 +13:00
chown -R hydrus:hydrus /usr/src/app && \
chmod +x \
server.py \
bin/swfrender_linux \
bin/upnpc_linux && \
2019-01-20 02:51:48 +13:00
rm \
bin/swfrender_osx \
bin/swfrender_win32.exe \
bin/upnpc_osx \
bin/upnpc_win32.exe && \
mkdir /data && \
chown -R hydrus:hydrus /data && \
apt-get update && apt-get install -y \
build-essential \
2019-01-20 02:51:48 +13:00
ffmpeg \
multiarch-support \
wget && \
dpkg -i libjpeg8_8d-2_amd64.deb && \
rm libjpeg8_8d-2_amd64.deb && \
pip install --upgrade pip && \
2019-01-20 02:51:48 +13:00
pip install virtualenv && \
virtualenv venv && \
. venv/bin/activate && \
2019-01-20 02:51:48 +13:00
pip install \
beautifulsoup4~=4.8.0 \
chardet~=3.0.4 \
2019-06-14 01:11:48 +12:00
lz4~=2.1.10 \
numpy~=1.17.0 \
2019-08-04 02:54:13 +12:00
opencv-python-headless~=4.1.0.25 \
pillow~=6.1.0 \
psutil~=5.6.3 \
2019-01-20 02:51:48 +13:00
pylzma~=0.5.0 \
pyopenssl~=19.0.0 \
2019-08-04 02:54:13 +12:00
pyyaml~=5.1.2 \
requests~=2.22.0 \
2019-01-20 02:51:48 +13:00
send2trash~=1.5.0 \
service_identity~=18.1.0 \
twisted~=19.2.1 && \
2019-01-20 02:51:48 +13:00
rm -r ~/.cache && \
apt-get clean && apt-get autoclean && apt-get autoremove --purge -y && \
rm -rf /var/lib/apt/lists/*
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"]