Skip to content

Commit

Permalink
Merge pull request #47 from grodin/grodin/docker
Browse files Browse the repository at this point in the history
Dockerize
  • Loading branch information
ynqa committed Jun 19, 2024
2 parents ec55e8d e02a499 commit ca0301f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 1 @@
target
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 1,20 @@
## Build stage
FROM rust:1.79-alpine3.20 as builder

RUN rustup target add x86_64-unknown-linux-musl

RUN apk add musl-dev

WORKDIR /jnv

COPY . /jnv

RUN cargo build --target=x86_64-unknown-linux-musl --release

## Final image

FROM scratch

COPY --from=builder /jnv/target/x86_64-unknown-linux-musl/release/jnv /bin/jnv

ENTRYPOINT ["/bin/jnv"]

0 comments on commit ca0301f

Please sign in to comment.