Skip to content

Commit

Permalink
chore: fix dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
incubator4 committed Feb 27, 2024
1 parent 6087a05 commit 2544d51
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
FROM messense/rust-musl-cross:x86_64-musl as builder
FROM rust:1.76.0-alpine3.18 as builder

WORKDIR /usr/src

RUN apk add --no-cache \
pkgconfig

COPY Cargo.toml Cargo.lock ./
COPY src ./src

RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/src/target \
cargo install --path .
cargo build --release


FROM alpine as runner

RUN apk --no-cache add ca-certificates

COPY --from=builder /root/.cargo/bin/blackbox-http-discovery .
COPY --from=builder /usr/src/target/release/blackbox-http-discovery .
COPY config.yaml .

USER 1000
Expand Down

0 comments on commit 2544d51

Please sign in to comment.