2
0
Fork 0
qbittorrent-natpmp-docker/Dockerfile

63 lines
1.8 KiB
Docker
Raw Normal View History

# syntax=docker/dockerfile:1
FROM ubuntu:jammy AS docker-cli
RUN apt-get update && \
apt-get install --no-install-suggests --no-install-recommends --yes --quiet \
ca-certificates \
curl \
gnupg \
lsb-release
RUN mkdir -m 0755 -p /etc/apt/keyrings && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
RUN apt-get update && \
apt-get install --no-install-suggests --no-install-recommends --yes --quiet docker-ce-cli
2023-03-17 02:08:18 +01:00
FROM ubuntu:jammy
2023-03-17 01:56:24 +01:00
LABEL org.opencontainers.image.source="https://github.com/soxfor/qbittorrent-natmap"
2023-03-17 01:42:43 +01:00
LABEL org.opencontainers.image.base.name="ubuntu:jammy"
2023-03-17 02:02:19 +01:00
LABEL description="Map port via NAT-PMP and update qBittorrent configuration"
LABEL version="1.0.7"
2023-03-17 01:42:43 +01:00
2023-03-16 20:54:23 +01:00
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install --no-install-suggests --no-install-recommends --yes --quiet \
natpmpc \
curl \
bc \
netcat-openbsd \
tzdata \
locales
2023-03-16 20:54:23 +01:00
RUN rm -rf /var/lib/apt/lists/* /var/cache/apt/*
RUN apt-get clean
ENV TZ=Etc/UTC
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
RUN sed -i "/${LANG}/s/^# //g" /etc/locale.gen && \
locale-gen && \
ln -fs "/usr/share/zoneinfo/${TZ}" /etc/localtime && \
dpkg-reconfigure tzdata
2023-03-16 20:54:23 +01:00
ENV QBITTORRENT_SERVER=
ENV QBITTORRENT_PORT=8080
ENV QBITTORRENT_USER=admin
ENV QBITTORRENT_PASS=adminadmin
ENV VPN_GATEWAY=
ENV VPN_CT_NAME=gluetun
ENV VPN_IF_NAME=tun0
ENV CHECK_INTERVAL=300
ENV NAT_LEASE_LIFETIME=300
2023-03-16 20:54:23 +01:00
COPY --from=docker-cli /usr/bin/docker /usr/bin/docker
2023-03-16 20:54:23 +01:00
COPY data/start.sh /start.sh
2023-03-16 20:54:23 +01:00
RUN chmod 750 /start.sh
CMD ["./start.sh"]