2
0
Fork 0

update: Dockerfile - new vars include docker cli

- new: vars VPN_CT_NAME and VPN_IF_NAME, used while managing iptables rules for the listen port of qBittorrent
- new: include docker client binary in image to connect to vpn container
This commit is contained in:
soxfor 2023-03-18 01:17:34 +00:00
parent 444cfd1cc6
commit 19659a2a1b
1 changed files with 17 additions and 1 deletions

View File

@ -1,9 +1,21 @@
# syntax=docker/dockerfile:1
FROM ubuntu:jammy AS docker-cli
RUN apt update && \
apt install --no-install-suggests --no-install-recommends -y 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 update && \
apt install --no-install-suggests --no-install-recommends -y docker-ce-cli
FROM ubuntu:jammy
LABEL org.opencontainers.image.source="https://github.com/soxfor/qbittorrent-natmap"
LABEL org.opencontainers.image.base.name="ubuntu:jammy"
LABEL description="Map port via NAT-PMP and update qBittorrent configuration"
LABEL version="1.0.0"
LABEL version="1.0.2"
ARG DEBIAN_FRONTEND=noninteractive
@ -17,10 +29,14 @@ 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'
COPY --from=docker-cli /usr/bin/docker /usr/bin/docker
COPY data/start.sh /start.sh
RUN chmod 750 /start.sh
CMD ["./start.sh"]