Add Dockerfiles (#56)

This commit is contained in:
kek.rs 2024-12-17 00:05:12 +01:00 committed by GitHub
parent 7b44ee30d6
commit 2156bff59a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 0 deletions

14
Dockerfile Normal file
View file

@ -0,0 +1,14 @@
FROM docker.io/library/rust:alpine AS BUILDER
WORKDIR /build
RUN apk update && apk add cmake build-base
COPY src /build/src
COPY crates /build/crates
COPY Cargo.toml Cargo.lock /build
RUN cargo build -r
FROM scratch AS RUNNER
COPY --from=BUILDER /build/target/release/minedmap /minedmap
ENTRYPOINT [ "/minedmap" ]

3
Dockerfile.viewer Normal file
View file

@ -0,0 +1,3 @@
FROM docker.io/library/nginx:alpine
COPY viewer /usr/share/nginx/html
# datadir should be mounted to: /usr/share/nginx/html/data