Skip to content

Commit

Permalink
Use muslrust to build docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
adzialocha committed Sep 7, 2022
1 parent b04a799 commit 6a54891
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ekidd/rust-musl-builder:latest AS BUILDER
FROM clux/muslrust:stable AS BUILDER

# Add source code with right permissions
ADD --chown=rust:rust . ./
# Add source code
ADD . ./

# Build our application
RUN cargo build --release
Expand All @@ -10,6 +10,7 @@ RUN cargo build --release
FROM alpine:latest
RUN apk --no-cache add ca-certificates
COPY --from=BUILDER \
/home/rust/src/target/x86_64-unknown-linux-musl/release/aquadoggo \
/usr/local/bin/
/volume/target/x86_64-unknown-linux-musl/release/aquadoggo \
/usr/local/bin/

CMD /usr/local/bin/aquadoggo

0 comments on commit 6a54891

Please sign in to comment.