1
1
# ##########################################################
2
2
# Builder image: we compile the code here (static build)
3
- FROM alpine:3.19 .0 AS build
3
+ FROM alpine:3.21 .0 AS build
4
4
5
5
RUN ["apk" , "--no-cache" , "add" ,\
6
6
"clang" ,\
@@ -26,33 +26,32 @@ COPY other/bootstrap_node_packets.[ch] other/
26
26
COPY other/DHT_bootstrap.c other/
27
27
COPY other/pkgconfig other/pkgconfig
28
28
COPY other/rpm other/rpm
29
- COPY testing/misc_tools.[ch] testing/
29
+ COPY testing testing
30
30
COPY toxcore toxcore
31
31
COPY toxencryptsave toxencryptsave
32
32
COPY third_party third_party
33
33
COPY CMakeLists.txt so.version ./
34
34
COPY other/bootstrap_daemon/CMakeLists.txt other/bootstrap_daemon/CMakeLists.txt
35
- COPY testing/CMakeLists.txt testing/CMakeLists.txt
36
35
37
36
RUN CC=clang cmake -B_build -H. \
38
- -GNinja \
39
- -DCMAKE_C_FLAGS="-DTCP_SERVER_USE_EPOLL -fsanitize=alignment,return,returns-nonnull-attribute,vla-bound,unreachable,float-cast-overflow,null -fsanitize-trap=all -fstack-protector-all" \
40
- -DCMAKE_UNITY_BUILD=ON \
41
- -DCMAKE_BUILD_TYPE=Release \
42
- -DFULLY_STATIC=ON \
43
- -DMIN_LOGGER_LEVEL=DEBUG \
44
- -DBUILD_TOXAV=OFF \
45
- -DBOOTSTRAP_DAEMON=ON && \
46
- cmake --build _build --target install
37
+ -GNinja \
38
+ -DCMAKE_C_FLAGS="-DTCP_SERVER_USE_EPOLL -fsanitize=alignment,return,returns-nonnull-attribute,vla-bound,unreachable,float-cast-overflow,null -fsanitize-trap=all -fstack-protector-all" \
39
+ -DCMAKE_UNITY_BUILD=ON \
40
+ -DCMAKE_BUILD_TYPE=Release \
41
+ -DFULLY_STATIC=ON \
42
+ -DMIN_LOGGER_LEVEL=TRACE \
43
+ -DBUILD_TOXAV=OFF \
44
+ -DBOOTSTRAP_DAEMON=ON \
45
+ && cmake --build _build --target install
47
46
48
47
# Verify checksum from dev-built binary, so we can be sure Docker Hub doesn't
49
48
# mess with your binaries.
50
49
COPY other/bootstrap_daemon/docker/tox-bootstrapd.sha256 other/bootstrap_daemon/docker/
51
50
ARG CHECK=sha256sum
52
- RUN SHA256="$(" $CHECK" /usr/local/bin/tox-bootstrapd)" && \
53
- ("$CHECK" -c other/bootstrap_daemon/docker/tox-bootstrapd.sha256 || \
54
- (echo "::error file=other/bootstrap_daemon/docker/tox-bootstrapd.sha256,line=1::$SHA256" && \
55
- false))
51
+ RUN SHA256="$(" $CHECK" /usr/local/bin/tox-bootstrapd)" \
52
+ && ("$CHECK" -c other/bootstrap_daemon/docker/tox-bootstrapd.sha256 || \
53
+ (echo "::error file=other/bootstrap_daemon/docker/tox-bootstrapd.sha256,line=1::$SHA256" \
54
+ && false))
56
55
57
56
# Remove all the example bootstrap nodes from the config file.
58
57
COPY other/bootstrap_daemon/tox-bootstrapd.conf other/bootstrap_daemon/
@@ -69,12 +68,14 @@ FROM debian:bookworm-slim
69
68
70
69
COPY --from=build /usr/local/bin/tox-bootstrapd /usr/local/bin/
71
70
COPY --from=build /src/c-toxcore/other/bootstrap_daemon/tox-bootstrapd.conf /etc/tox-bootstrapd.conf
72
- RUN useradd --home-dir /var/lib/tox-bootstrapd --create-home \
73
- --system --shell /sbin/nologin \
74
- --comment "Account to run the Tox DHT bootstrap daemon" \
75
- --user-group tox-bootstrapd && \
76
- chmod 644 /etc/tox-bootstrapd.conf && \
77
- chmod 700 /var/lib/tox-bootstrapd
71
+ RUN useradd \
72
+ --home-dir /var/lib/tox-bootstrapd \
73
+ --create-home \
74
+ --system --shell /sbin/nologin \
75
+ --comment "Account to run the Tox DHT bootstrap daemon" \
76
+ --user-group tox-bootstrapd \
77
+ && chmod 644 /etc/tox-bootstrapd.conf \
78
+ && chmod 700 /var/lib/tox-bootstrapd
78
79
79
80
WORKDIR /var/lib/tox-bootstrapd
80
81
0 commit comments