Skip to content

Commit

Permalink
Finally fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanRichterHuber committed May 7, 2024
1 parent d9fad1e commit 11db7b2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:slim-buster as builder
FROM rust:slim-bookworm as builder

ARG TARGETARCH
ENV UPX_VERSION="4.2.2"
Expand All @@ -20,12 +20,13 @@ RUN mkdir -p tools/upx/ \
COPY . .

# Start building ...
RUN cargo build --release
# Workaround for https://github.com/rust-lang/cargo/issues/8719 on armv7
RUN --mount=type=tmpfs,target=/.cargo CARGO_HOME=/.cargo cargo build --release

# Compress executable. This saves about 12MB (97MB -> 85MB) in the final image
RUN ./tools/upx/upx --best --lzma target/release/thermobeacon-server

FROM debian:buster-slim
FROM debian:bookworm-slim

# Install dependencies required for runtime
RUN apt-get update \
Expand Down

0 comments on commit 11db7b2

Please sign in to comment.