Skip to content

Commit

Permalink
feat: initial docker support
Browse files Browse the repository at this point in the history
  • Loading branch information
Erb3 committed Aug 20, 2024
1 parent 8a716b0 commit ab5342c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .dockerignore
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
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM rust:1.79 AS builder
WORKDIR /usr/src/pumpkin
COPY . .
RUN ls
RUN cargo install --path ./pumpkin

FROM rust
WORKDIR /pumpkin
RUN apt update && apt-get install -y libssl-dev pkg-config ca-certificates && rm -rf /var/lib/apt/lists/*
COPY --from=builder /usr/local/cargo/bin/pumpkin /pumpkin/pumpkin
CMD ["/pumpkin/pumpkin"]

# FROM rust:1.79-alpine AS builder
# WORKDIR /usr/src/pumpkin
# COPY . .
# RUN apk add openssl-dev libssl3 ca-certificates pkgconfig musl-dev
# RUN cargo install --path ./pumpkin

# FROM rust:1.79-alpine
# WORKDIR /pumpkin
# RUN apk add openssl ca-certificates pkgconfig
# COPY --from=builder /usr/local/cargo/bin/pumpkin /pumpkin/pumpkin
# CMD ["/pumpkin/pumpkin"]

#docker run --rm -v "./world:/pumpkin/world" pumpkin

0 comments on commit ab5342c

Please sign in to comment.