diff options
author | Alexander Neonxp Kiryukhin <i@neonxp.ru> | 2024-10-06 17:04:37 +0300 |
---|---|---|
committer | Alexander Neonxp Kiryukhin <i@neonxp.ru> | 2024-10-06 17:04:37 +0300 |
commit | 6160b4fdc5f37e4ceaa6b3c5acc855f466049d61 (patch) | |
tree | b6e41f9cad22515a61cc50b0a82d98ee55e0c3e3 /Dockerfile | |
parent | 81b13617c4d0ca68afb181d1105386f0c339864d (diff) |
Первая версия
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..977c118 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +# Build backend +FROM golang:1.23.2-alpine3.20 AS backend +ARG VERSION +WORKDIR /app +RUN apk update --no-cache && apk add --no-cache tzdata +COPY go.mod go.sum ./ +RUN go mod download && go mod verify +COPY . . +RUN go build -o shorg ./cmd/app + +# Runtime container +FROM alpine:3.20 +WORKDIR /app +RUN apk update --no-cache && apk add --no-cache ca-certificates + +COPY --from=backend /usr/share/zoneinfo/Europe/Moscow /usr/share/zoneinfo/Europe/Moscow +COPY --from=backend /app/shorg /app/shorg + +ENV TZ=Europe/Moscow + +EXPOSE 8000 + +CMD ["/app/shorg"]
\ No newline at end of file |