Update Dockerfile.stable

This commit is contained in:
STAM 2022-05-30 16:04:21 +03:00 committed by GitHub
parent 3f42edb5a9
commit 08078460cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,9 @@ ARG DEBIAN_FRONTEND=noninteractive
################################################################## ##################################################################
# ARGuments # ARGuments
################################################################## ##################################################################
ARG QBT_DIR=/opt/qbittorrent ENV QBT_DIR=/opt/qbittorrent
ENV QBT_PORT_WEBUI=8282
ENV QBT_PORT_TRACKER=9000
################################################################## ##################################################################
# Files and folders # Files and folders
@ -44,14 +46,14 @@ RUN apt clean -y && \
VOLUME ${QBT_DIR} VOLUME ${QBT_DIR}
#healthcheck. good practice #healthcheck. good practice
HEALTHCHECK --interval=2m --timeout=3s CMD curl -f http://localhost:8282/ || exit 1 HEALTHCHECK --interval=2m --timeout=3s CMD curl -f http://localhost:${QBT_PORT_WEBUI}/ || exit 1
# Add image configuration and scripts # Add image configuration and scripts
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
RUN chmod 755 /usr/bin/docker-entrypoint.sh RUN chmod 755 /usr/bin/docker-entrypoint.sh
#Final config #Final config
EXPOSE 8282 EXPOSE ${QBT_PORT_WEBUI} ${QBT_PORT_WEBUI}/udp ${QBT_PORT_TRACKER} ${QBT_PORT_TRACKER}/udp
ENTRYPOINT ["tini", "-s", "--", "docker-entrypoint.sh"] ENTRYPOINT ["tini", "-s", "--", "docker-entrypoint.sh"]
CMD ["docker-entrypoint.sh"] CMD ["docker-entrypoint.sh"]