-
-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from Erb3-forked/docker
feat: initial docker support
- Loading branch information
Showing
4 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# A whitelist of files that should be included into docker | ||
# Put an exclaimation mark before everything to include | ||
|
||
# Ignore everything | ||
* | ||
|
||
# Allow the source code folders | ||
!/pumpkin*/ | ||
|
||
# Dependencies | ||
!Cargo.lock | ||
!Cargo.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM rust:1-alpine3.19 AS builder | ||
ENV RUSTFLAGS="-C target-feature=-crt-static -C target-cpu=native" | ||
RUN apk add --no-cache musl-dev | ||
WORKDIR /pumpkin | ||
COPY . /pumpkin | ||
RUN cargo build --release | ||
RUN strip target/release/pumpkin | ||
|
||
FROM alpine:3.19 | ||
WORKDIR /pumpkin | ||
RUN apk add --no-cache libgcc | ||
COPY --from=builder /pumpkin/target/release/pumpkin /pumpkin/pumpkin | ||
ENTRYPOINT ["/pumpkin/pumpkin"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters