Skip to content

Commit

Permalink
Use standard image for alpine build
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffreyarthaud committed Nov 29, 2022
1 parent b92fad3 commit f180b05
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
FROM ekidd/rust-musl-builder as cargo-build
FROM rust:alpine as cargo-build

RUN apk update
RUN apk add --no-cache openssl-dev musl-dev

WORKDIR /home/rust/src
COPY ./Cargo.toml ./Cargo.toml
COPY ./Cargo.lock ./Cargo.lock
COPY ./src ./src
COPY ./i18n ./i18n
COPY ./i18n.toml ./i18n.toml
RUN rustup target add x86_64-unknown-linux-musl

FROM cargo-build as release-dev
RUN cargo build
RUN cargo build --target x86_64-unknown-linux-musl
RUN cargo test

FROM cargo-build as release-prod
RUN cargo build --release
RUN cargo build --target x86_64-unknown-linux-musl --release

FROM alpine:latest as image-dev
COPY --from=release-dev /home/rust/src/target/x86_64-unknown-linux-musl/debug/gitlab-project-doctor /usr/local/bin
Expand Down

0 comments on commit f180b05

Please sign in to comment.