forked from soxfor/qbittorrent-natmap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
58 lines (46 loc) · 1.72 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
# 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
FROM ubuntu:jammy
LABEL org.opencontainers.image.source="https://github.com/ssnailed/qbittorrent-natpmp"
LABEL org.opencontainers.image.base.name="ubuntu:jammy"
LABEL description="Map port via NAT-PMP and update qBittorrent configuration"
LABEL version="2.0.0"
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 \
iproute2
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
ENV QBITTORRENT_SERVER=localhost
ENV QBITTORRENT_PORT=8080
ENV CHECK_INTERVAL=45
ENV NAT_LEASE_LIFETIME=60
COPY --from=docker-cli /usr/bin/docker /usr/bin/docker
COPY data/start.sh /start.sh
RUN chmod 750 /start.sh
CMD ["./start.sh"]