mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-10-20 18:56:21 +00:00
Debian 11 left LTS at the end of August 2026. The runtime stage's `apt-get install openssl` now fails: the index still names openssl 1.1.1w-0+deb11u8 but deb.debian.org answers 404 for the file, so the image cannot be built at all. Moving only the runtime to bookworm would break the binaries: openssl-sys is in the lock, so they link the system libssl, and a bullseye build wants libssl1.1, which bookworm does not ship. Both stages move together: the builder becomes rust:1.88-bookworm (the same toolchain ci-unified carried) and the runtime bookworm-slim, so the binaries link the libssl3 they run with.
31 lines
847 B
Docker
31 lines
847 B
Docker
FROM docker.io/library/rust:1.88-bookworm AS builder
|
|
|
|
ARG PROFILE=release
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
RUN cargo build --${PROFILE} --bins -j 2
|
|
|
|
# MAIN IMAGE FOR PEOPLE TO PULL --- small one#
|
|
FROM docker.io/debian:bookworm-slim
|
|
LABEL maintainer="Dijital Kurdistan Tech Institute <admin@pezkuwichain.io>"
|
|
LABEL description="Pezkuwichain Telemetry Backend shard/core binaries"
|
|
|
|
ARG PROFILE=release
|
|
WORKDIR /usr/local/bin
|
|
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
|
COPY --from=builder /app/target/$PROFILE/telemetry_shard /usr/local/bin
|
|
COPY --from=builder /app/target/$PROFILE/telemetry_core /usr/local/bin
|
|
|
|
RUN useradd -m -u 1000 -U telemetry && \
|
|
apt-get -y update && \
|
|
apt-get -y install openssl && \
|
|
apt-get autoremove -y && \
|
|
apt-get clean && \
|
|
rm -rf /var/lib/apt/lists/
|
|
|
|
USER telemetry
|
|
EXPOSE 8000
|