Support dynamically-linked and/or native musl targets

See https://github.com/rust-lang/rust/pull/40113#issuecomment-323193341
This commit is contained in:
Matthieu Guegan 2024-05-16 09:55:04 +02:00
parent ed3e5f48a0
commit f8c17487bd

View File

@ -15,13 +15,13 @@ FROM rust:1.76-alpine as backend
WORKDIR /tmp
RUN apk add --no-cache libc-dev openssl-dev alpine-sdk
COPY ./packages/backend ./
RUN cargo build --release
RUN RUSTFLAGS="-Ctarget-feature=-crt-static" cargo build --release
# RUNNER
FROM alpine:3.19
WORKDIR /app
RUN apk add --no-cache curl
RUN apk add --no-cache curl libgcc
COPY --from=backend /tmp/target/release/cryptgeon .
COPY --from=client /tmp/packages/frontend/build ./frontend
ENV FRONTEND_PATH="./frontend"