aboutsummaryrefslogblamecommitdiff
path: root/Dockerfile
blob: 134a3a5972c4ab34de66e063f78d34b782d8d6be (plain) (tree)






















                                                                                       
# Build backend
FROM golang:1.23.2-alpine3.20 AS backend
ARG VERSION
WORKDIR /srv
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 app ./cmd/app

# Runtime container
FROM alpine:3.20
WORKDIR /srv
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 /srv/app /srv/app

ENV TZ=Europe/Moscow

EXPOSE 8000

ENTRYPOINT ["/srv/app"]