From 12ed72e4e1da181a6c87319a50d3b4142788b4c0 Mon Sep 17 00:00:00 2001 From: Alexander NeonXP Kiryukhin Date: Sun, 21 Jul 2024 22:04:13 +0300 Subject: фикс ошибки и докерфайл MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Dockerfile (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5b46639 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +# syntax=docker/dockerfile:1 + +FROM golang:1.22.5-alpine3.20 AS builder + +WORKDIR /app + +COPY go.mod go.sum ./ +RUN go mod download + +COPY . . + +RUN CGO_ENABLED=0 GOOS=linux go build -o /app/gorum + +FROM alpine:3.20 + +COPY --from=builder /app/gorum . + +ENTRYPOINT ["/gorum"] \ No newline at end of file -- cgit v1.2.3