Skip to content

Commit

Permalink
Improve docker build process
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul1365972 committed Feb 5, 2025
1 parent 3d240d2 commit 56dae6f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
1 change: 0 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
Expand Down
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM --platform=$BUILDPLATFORM rust:alpine AS builder
RUN apk add --no-cache musl-dev openssl-dev openssl-libs-static
WORKDIR /app
COPY ./src/ ./src/
COPY ./crates/ ./crates/
COPY ./.cargo/ ./cargo/
COPY ./Cargo.toml ./Cargo.lock ./
RUN cargo build --release

FROM scratch
COPY --from=builder /app/target/**/mchprs /
VOLUME ["/data"]
WORKDIR /data
ENTRYPOINT ["/mchprs"]
15 changes: 0 additions & 15 deletions docker/Dockerfile

This file was deleted.

0 comments on commit 56dae6f

Please sign in to comment.