Skip to content

Commit 5b5a3a5

Browse files
committed
fix Docker image build
1 parent 8092f41 commit 5b5a3a5

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Dockerfile

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
FROM ekidd/rust-musl-builder:1.57.0 AS builder
1+
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'
28
COPY . ./
3-
RUN cargo b --release --bin cddl
9+
RUN cargo b --release --bin cddl --target "$TARGET"
410

511
FROM scratch
6-
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
713
ENTRYPOINT [ "/cddl" ]

0 commit comments

Comments
 (0)