-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
85 lines (72 loc) · 2.54 KB
/
Copy pathDockerfile
File metadata and controls
85 lines (72 loc) · 2.54 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
FROM alpine:3.22.2 AS builder
WORKDIR /tmp/amule
# Install build dependencies
RUN apk add --no-cache \
cmake make g++ git \
wxwidgets-dev \
boost-dev \
zlib-dev \
gettext-dev \
libedit-dev \
readline-dev \
libpng-dev \
curl-dev \
&& apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing crypto++-dev
# Copy patched source. amule-src/.git is included so cmake can run
# `git describe` and embed the rev in the amuled banner.
COPY amule-src/ .
# chown so git accepts the .git owned by the host UID; .git must stay
# in place for the whole RUN (cmake reconfigures on missing .git/HEAD).
RUN chown -R root:root . && \
mkdir build && cd build && \
cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_DAEMON=ON \
-DBUILD_AMULECMD=ON \
-DBUILD_ALCC=ON \
-DBUILD_ED2K=ON \
-DBUILD_MONOLITHIC=OFF \
-DBUILD_REMOTEGUI=OFF \
-DBUILD_WEBSERVER=OFF \
-DBUILD_CAS=OFF \
-DBUILD_WXCAS=OFF \
-DBUILD_ALC=OFF \
-DBUILD_FILEVIEW=OFF \
-DBUILD_PLASMAMULE=OFF \
-DBUILD_XAS=OFF \
-DENABLE_UPNP=OFF \
-DENABLE_NLS=ON \
-DENABLE_BOOST=ON \
&& make -j$(nproc) \
&& make install DESTDIR=/tmp/install
FROM alpine:3.22.2
LABEL maintainer="amule-fiber"
# Install runtime dependencies
# su-exec: used by entrypoint.sh to exec amuled as AMULE_USER so signals
# (SIGTERM from `docker stop`) reach amuled directly.
# curl: libcurl runtime + curl CLI (used by MOD_FIX_KAD_BOOTSTRAP).
RUN apk add --no-cache \
libedit libgcc libintl libpng libstdc++ musl readline wxwidgets zlib \
tzdata pwgen curl su-exec \
&& apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing crypto++
# Copy built binaries
COPY --from=builder /tmp/install/usr/bin/amuled /usr/bin/
COPY --from=builder /tmp/install/usr/bin/amulecmd /usr/bin/
COPY --from=builder /tmp/install/usr/bin/alcc /usr/bin/
COPY --from=builder /tmp/install/usr/bin/ed2k /usr/bin/
# Verify binaries link correctly
RUN ldd /usr/bin/amuled && \
ldd /usr/bin/amulecmd && \
ldd /usr/bin/alcc && \
ldd /usr/bin/ed2k
# Add entrypoint
COPY entrypoint.sh /home/amule/entrypoint.sh
RUN chmod +x /home/amule/entrypoint.sh
WORKDIR /home/amule
# 4712/tcp = External Connect (amulecmd / remote GUI)
# 4662/tcp = eMule TCP
# 4665/udp = eMule UDP (server)
# 4672/udp = eMule UDP (Kademlia)
EXPOSE 4712/tcp 4662/tcp 4665/udp 4672/udp
ENTRYPOINT ["/home/amule/entrypoint.sh"]