dockerfiles/transmission/Dockerfile

54 lines
1.5 KiB
Docker
Raw Normal View History

2022-03-07 13:55:05 +01:00
FROM alpine:3.14
ENV VER 3.00
2021-03-26 15:11:26 +01:00
RUN apk add --no-cache --virtual .build-deps \
2022-03-07 13:55:05 +01:00
curl \
2021-03-26 15:11:26 +01:00
cmake \
make \
gcc \
g++ \
musl-dev \
curl-dev \
automake \
autoconf \
libtool && \
mkdir -p /usr/local/src && \
2022-03-07 13:55:05 +01:00
curl -L \
--output "/usr/local/src/transmission-${VER}.tar.xz" \
"https://github.com/transmission/transmission-releases/raw/master/transmission-${VER}.tar.xz" && \
tar -xf "/usr/local/src/tranmission-${VER}.tar.xz" -C /usr/local/src && \
2021-03-26 15:11:26 +01:00
mkdir -p /usr/local/src/transmission/build && \
cd /usr/local/src/transmission/build && \
cmake .. && \
make && \
make install && \
cd / && \
rm -r /usr/local/src && \
apk del .build-deps && \
apk add --no-cache curl
RUN addgroup \
--gid 10001 \
transmission && \
adduser \
--uid 10000 \
--home /var/lib/transmission \
--ingroup transmission \
--disabled-password \
--shell /sbin/nologin \
2021-03-26 16:21:15 +01:00
transmission && \
mkdir -p \
/var/lib/transmission/blocklists \
/var/lib/transmission/downloads \
/var/lib/transmission/incomplete \
/var/lib/transmission/resume \
/var/lib/transmission/torrents && \
chown -R transmission:transmission /var/lib/transmission
2021-03-26 15:11:26 +01:00
ENV TRANSMISSION_HOME /var/lib/transmission
USER transmission
2021-03-26 16:21:15 +01:00
WORKDIR /var/lib/transmission
2021-03-26 15:11:26 +01:00
CMD ["/usr/local/bin/transmission-daemon", "--foreground"]