Add dockerfile

master
Edward Shen 2021-07-18 21:27:29 -04:00
parent 6b1c913b5d
commit 6d6bf7371b
Signed by: edward
GPG Key ID: 19182661E818369F
2 changed files with 19 additions and 0 deletions

10
.dockerignore Normal file
View File

@ -0,0 +1,10 @@
# Ignore everything
*
# Only include necessary paths (This should be synchronized with `Cargo.toml`)
!db_queries/
!src/
!settings.sample.yaml
!sqlx-data.json
!Cargo.toml
!Cargo.lock

9
Dockerfile Normal file
View File

@ -0,0 +1,9 @@
FROM rust:alpine as builder
COPY . .
RUN apk add --no-cache file make musl-dev \
&& cargo install --path . \
&& strip /usr/local/cargo/bin/mangadex-home
FROM alpine:latest
COPY --from=builder /usr/local/cargo/bin/mangadex-home /usr/local/bin/mangadex-home
CMD ["mangadex-home"]