We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8092f41 commit 5b5a3a5Copy full SHA for 5b5a3a5
Dockerfile
@@ -1,7 +1,13 @@
1
-FROM ekidd/rust-musl-builder:1.57.0 AS builder
+FROM rust:slim AS builder
2
+RUN apt update && apt install -y musl-tools musl-dev
3
+RUN apt-get install -y build-essential
4
+RUN yes | apt install gcc-x86-64-linux-gnu
5
+ENV TARGET x86_64-unknown-linux-musl
6
+RUN rustup target add "$TARGET"
7
+ENV RUSTFLAGS='-C linker=x86_64-linux-gnu-gcc'
8
COPY . ./
-RUN cargo b --release --bin cddl
9
+RUN cargo b --release --bin cddl --target "$TARGET"
10
11
FROM scratch
-COPY --from=builder /home/rust/src/target/x86_64-unknown-linux-musl/release/cddl /cddl
12
+COPY --from=builder /target/x86_64-unknown-linux-musl/release/cddl /cddl
13
ENTRYPOINT [ "/cddl" ]
0 commit comments