diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..528666e --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +/target +/deny.toml +/doc diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ba7b3be --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM rust:1-alpine AS builder + +COPY . /src + +WORKDIR /src + +RUN apk add --no-cache musl-dev + +RUN cargo build --release + +FROM alpine:latest + +LABEL \ + maintainer="Yumechi " \ + org.opencontainers.image.authors="Yumechi " \ + org.opencontainers.image.source="https://forge.yumechi.jp/yume/replikey.git" \ + org.opencontainers.image.base.name="alpine" + +COPY --from=builder /src/target/release/replikey /usr/local/bin/replikey + +ENTRYPOINT ["replikey"]