diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..81768b8 --- /dev/null +++ b/.dockerignore @@ -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 \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3112a06 --- /dev/null +++ b/Dockerfile @@ -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"] \ No newline at end of file