diff --git a/.gitignore b/.gitignore index 133f18b..b8c3a19 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ !*/ !hash.sh +!Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..204e9e8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM chimeralinux/chimera:latest AS base +RUN apk add go + +FROM base AS builder +WORKDIR /app +COPY . . +RUN go build -ldflags "-s -w" -o diodemail -buildmode=pie ./cmd/server + +FROM base AS runner +WORKDIR /app +COPY --from=builder /app/diodemail ./diodemail + +CMD ["./diodemail"]