Skip to content

Commit

Permalink
build backend with musl
Browse files Browse the repository at this point in the history
  • Loading branch information
ranile committed Sep 1, 2023
1 parent ac45609 commit b4ce5a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions services/backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rust:latest as builder
FROM clux/muslrust:stable as builder

WORKDIR /app

Expand All @@ -8,12 +8,12 @@ RUN cargo new frontend
COPY ./services ./services
COPY Cargo.* ./

RUN cargo build --package backend --release
RUN cargo build --package backend --release --target x86_64-unknown-linux-musl

FROM gcr.io/distroless/cc

EXPOSE 3000

COPY --from=builder /app/target/release/backend /
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/backend /

CMD ["/backend"]

0 comments on commit b4ce5a6

Please sign in to comment.