Skip to content

Commit

Permalink
Fix docker build
Browse files Browse the repository at this point in the history
Signed-off-by: Matteo Joliveau <[email protected]>
  • Loading branch information
MatteoJoliveau committed Jul 14, 2023
1 parent 017471d commit 3c6ca4c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
File renamed without changes.
12 changes: 7 additions & 5 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/target
/.github
LICENSE.txt
README.md
*.ps1
**

!Cargo.toml
!Cargo.lock
!rust-toolchain.toml
!src
!.cargo
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM docker.io/library/rust:alpine as builder
FROM public.ecr.aws/docker/library/rust:1-alpine as builder

RUN rustup default stable
RUN apk add --no-cache musl-dev openssl-dev openssl-libs-static pkgconf git

# Set `SYSROOT` to a dummy path (default is /usr) because pkg-config-rs *always*
Expand All @@ -10,10 +12,9 @@ WORKDIR /wd
COPY . /wd
RUN cargo build --release --target=x86_64-unknown-linux-musl

FROM scratch
FROM public.ecr.aws/docker/library/alpine
ARG version=unknown
ARG release=unreleased

COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /wd/target/x86_64-unknown-linux-musl/release/shipit /
CMD ["/shipit"]
CMD ["/shipit"]

0 comments on commit 3c6ca4c

Please sign in to comment.