-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContainerfile
65 lines (54 loc) · 1.49 KB
/
Containerfile
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
59
60
61
62
63
64
65
FROM docker.io/alpine:latest AS base
FROM base AS builder
ARG BRANCH
RUN set -ex && \
apk add --no-cache --upgrade \
git \
python3 \
build-base \
cmake \
curl-dev \
gettext-dev \
openssl-dev \
linux-headers \
samurai
WORKDIR /usr/src
RUN git clone https://github.com/transmission/transmission transmission
WORKDIR /usr/src/transmission
RUN git checkout ${BRANCH} && git submodule update --init --recursive
RUN cmake \
-S . \
-B obj \
-G Ninja \
-D CMAKE_BUILD_TYPE=Release \
-D ENABLE_CLI=OFF \
-D ENABLE_DAEMON=ON \
-D ENABLE_GTK=OFF \
-D ENABLE_MAC=OFF \
-D ENABLE_QT=OFF \
-D ENABLE_TESTS=OFF \
-D ENABLE_UTILS=OFF \
-D ENABLE_UTP=ON \
-D ENABLE_WERROR=OFF \
-D ENABLE_DEPRECATED=OFF \
-D ENABLE_NLS=ON \
-D INSTALL_WEB=ON \
-D REBUILD_WEB=OFF \
-D INSTALL_DOC=OFF \
-D INSTALL_LIB=OFF \
-D RUN_CLANG_TIDY=OFF \
-D WITH_INOTIFY=ON \
-D WITH_CRYPTO="openssl" \
-D WITH_SYSTEMD=OFF && \
cmake --build obj --config Release; \
cmake --build obj --config Release --target install/strip
FROM base AS runtime
RUN set -ex && \
apk update && \
apk add --no-cache --upgrade libcurl libintl libgcc libstdc++
COPY --from=builder /usr/local/bin /usr/local/bin
COPY --from=builder /usr/local/share /usr/local/share
EXPOSE 9091/tcp 51413/tcp 51413/udp
VOLUME /config /watch /download
ENTRYPOINT [ "transmission-daemon" ]
CMD [ "--config-dir", "/config", "--watch-dir", "/watch", "--download-dir", "/download", "--foreground" ]