aboutsummaryrefslogblamecommitdiff
path: root/Dockerfile
blob: fda1d320c50ea6a77e0cde503f508f9258921165 (plain) (tree)
1
2
3
4
5
6
7
8
9







                                                      
                                 












                                                                                       
                        
# 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/shorg

# 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

ENTRYPOINT ["/app/shorg"]