mirror of
https://github.com/haugene/docker-transmission-openvpn.git
synced 2025-08-06 22:37:18 +02:00
feat(upgrade): ubuntu base 24.04 LTS (was 22.04) (#2907)
- Upgrade the ubuntu base image to 24.04 LTS - integrate the transmission build as build stage into the main Dockerfile, instead of seperate build image with missing dockerfile - update defalult built transmission version to 4.0.6 (current stable)
This commit is contained in:
parent
635f9316df
commit
042142914c
117
Dockerfile
117
Dockerfile
@ -19,30 +19,60 @@ RUN apk --no-cache add curl jq \
|
||||
&& wget -qO- https://github.com/6c65726f79/Transmissionic/releases/download/v1.8.0/Transmissionic-webui-v1.8.0.zip | unzip -q - \
|
||||
&& mv web /opt/transmission-ui/transmissionic
|
||||
|
||||
FROM ubuntu:24.04 AS base
|
||||
|
||||
FROM ubuntu:22.04 AS base
|
||||
ARG TBT_VERSION=4.0.6
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN set -ex; \
|
||||
apt-get update; \
|
||||
apt-get dist-upgrade -y; \
|
||||
apt-get install -y --no-install-recommends \
|
||||
tzdata \
|
||||
iproute2 \
|
||||
net-tools \
|
||||
nano \
|
||||
ca-certificates \
|
||||
curl \
|
||||
libcurl4-openssl-dev \
|
||||
libdeflate-dev \
|
||||
libevent-dev \
|
||||
libfmt-dev \
|
||||
libminiupnpc-dev \
|
||||
libnatpmp-dev \
|
||||
libpsl-dev \
|
||||
libssl-dev \
|
||||
natpmpc
|
||||
tzdata \
|
||||
iproute2 \
|
||||
net-tools \
|
||||
nano \
|
||||
ca-certificates \
|
||||
curl \
|
||||
libcurl4-openssl-dev \
|
||||
libdeflate-dev \
|
||||
libevent-dev \
|
||||
libfmt-dev \
|
||||
libminiupnpc-dev \
|
||||
libnatpmp-dev \
|
||||
libpsl-dev \
|
||||
libssl-dev \
|
||||
natpmpc \
|
||||
&& apt-get clean -y
|
||||
|
||||
FROM haugene/transmission-builder:4.0.5 as TransmissionBuilder
|
||||
FROM base as TransmissionBuilder
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
autoconf \
|
||||
automake \
|
||||
build-essential \
|
||||
checkinstall \
|
||||
cmake \
|
||||
intltool \
|
||||
libappindicator3-dev \
|
||||
libglib2.0-dev \
|
||||
libgtk-3-dev \
|
||||
libtool \
|
||||
pkg-config \
|
||||
xz-utils \
|
||||
&& mkdir -p /home/transmission4/ \
|
||||
&& cd /home/transmission4/ \
|
||||
&& curl -L -o transmission4.tar.xz "https://github.com/transmission/transmission/releases/download/${TBT_VERSION}/transmission-${TBT_VERSION}.tar.xz" \
|
||||
&& tar -xf transmission4.tar.xz \
|
||||
&& cd "transmission-${TBT_VERSION}" \
|
||||
&& mkdir build \
|
||||
&& cd build \
|
||||
&& cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .. \
|
||||
&& make \
|
||||
&& make install \
|
||||
&& checkinstall -y -D --pkgname transmission --pakdir /var/tmp --pkgversion=${TBT_VERSION} \
|
||||
&& apt-get clean -y
|
||||
|
||||
FROM base
|
||||
|
||||
@ -52,33 +82,36 @@ VOLUME /config
|
||||
COPY --from=TransmissionUIs /opt/transmission-ui /opt/transmission-ui
|
||||
COPY --from=TransmissionBuilder /var/tmp/*.deb /var/tmp/
|
||||
|
||||
ARG TBT_VERSION=4.0.5
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
RUN echo "installing Transmission" && set -x \
|
||||
&& if [[ ${TBT_VERSION} =~ ^4 ]]; then \
|
||||
ls -alh /var/tmp/*.deb ;\
|
||||
debfile=$(compgen -G /var/tmp/transmission_*_$(dpkg --print-architecture).deb); \
|
||||
if [[ -n ${debfile} ]]; then \
|
||||
echo "Installing transmission ${TBT_VERSION}" && dpkg -i ${debfile} ;\
|
||||
else echo "No /var/tmp/transmission_*_$(dpkg --print-architecture).deb found. Exiting" \
|
||||
; exit ; fi ; \
|
||||
else echo "Installing transmission from repository" \
|
||||
&& export TBT_VERSION=3.00 \
|
||||
&& apt-get install -y --no-install-recommends transmission-daemon transmission-cli; fi
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
dumb-init openvpn privoxy \
|
||||
tzdata dnsutils iputils-ping ufw openssh-client git jq curl wget unrar unzip bc \
|
||||
&& ln -s /usr/local/share/transmission/public_html/images /opt/transmission-ui/transmission-web-control \
|
||||
&& ln -s /usr/local/share/transmission/public_html/transmission-app.js /opt/transmission-ui/transmission-web-control/transmission-app.js \
|
||||
&& ln -s /usr/local/share/transmission/public_html/index.html /opt/transmission-ui/transmission-web-control/index.original.html \
|
||||
&& rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* \
|
||||
&& groupmod -g 1000 users \
|
||||
&& useradd -u 911 -U -d /config -s /bin/false abc \
|
||||
&& usermod -G users abc
|
||||
|
||||
RUN echo "Installing transmission ${TBT_VERSION}" \
|
||||
&& ls -alh /var/tmp/*.deb \
|
||||
&& debfile="$(compgen -G /var/tmp/transmission_*_$(dpkg --print-architecture).deb)" \
|
||||
&& dpkg -i "${debfile}" \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
bc \
|
||||
dnsutils \
|
||||
dumb-init \
|
||||
git \
|
||||
iputils-ping \
|
||||
jq \
|
||||
openssh-client \
|
||||
openvpn \
|
||||
privoxy \
|
||||
ufw \
|
||||
unrar \
|
||||
unzip \
|
||||
wget \
|
||||
&& ln -s /usr/local/share/transmission/public_html/images /opt/transmission-ui/transmission-web-control \
|
||||
&& ln -s /usr/local/share/transmission/public_html/transmission-app.js /opt/transmission-ui/transmission-web-control/transmission-app.js \
|
||||
&& ln -s /usr/local/share/transmission/public_html/index.html /opt/transmission-ui/transmission-web-control/index.original.html \
|
||||
&& apt-get clean -y \
|
||||
&& rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* \
|
||||
&& groupmod -g 1001 ubuntu \
|
||||
&& groupmod -g 1000 users \
|
||||
&& useradd -u 911 -U -d /config -s /bin/false abc \
|
||||
&& usermod -G users abc
|
||||
|
||||
# Add configuration and scripts
|
||||
ADD openvpn/ /etc/openvpn/
|
||||
|
Loading…
Reference in New Issue
Block a user