11# ##########################################################
22#  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
44
55RUN  ["apk" , "--no-cache" , "add" ,\
66 "clang" ,\
@@ -26,33 +26,32 @@ COPY other/bootstrap_node_packets.[ch] other/
2626COPY  other/DHT_bootstrap.c other/
2727COPY  other/pkgconfig other/pkgconfig
2828COPY  other/rpm other/rpm
29- COPY  testing/misc_tools.[ch]  testing/ 
29+ COPY  testing testing
3030COPY  toxcore toxcore
3131COPY  toxencryptsave toxencryptsave
3232COPY  third_party third_party
3333COPY  CMakeLists.txt so.version ./
3434COPY  other/bootstrap_daemon/CMakeLists.txt other/bootstrap_daemon/CMakeLists.txt
35- COPY  testing/CMakeLists.txt testing/CMakeLists.txt
3635
3736RUN  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
4746
4847#  Verify checksum from dev-built binary, so we can be sure Docker Hub doesn't
4948#  mess with your binaries.
5049COPY  other/bootstrap_daemon/docker/tox-bootstrapd.sha256 other/bootstrap_daemon/docker/
5150ARG  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))
5655
5756#  Remove all the example bootstrap nodes from the config file.
5857COPY  other/bootstrap_daemon/tox-bootstrapd.conf other/bootstrap_daemon/
@@ -69,12 +68,14 @@ FROM debian:bookworm-slim
6968
7069COPY  --from=build /usr/local/bin/tox-bootstrapd /usr/local/bin/
7170COPY  --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
7879
7980WORKDIR  /var/lib/tox-bootstrapd
8081
0 commit comments