docker files
All checks were successful
/ Make image (push) Successful in 59s

This commit is contained in:
nquidox 2026-03-21 15:22:17 +03:00
parent db16e49d46
commit ea57b2f489
2 changed files with 27 additions and 0 deletions

21
Dockerfile Normal file
View file

@ -0,0 +1,21 @@
FROM golang:1.26.1-alpine3.23 AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o main "./cmd"
FROM alpine:3.23
RUN apk add --no-cache \
tzdata \
ca-certificates
COPY --from=builder /app/main /usr/local/bin/app
RUN chmod +x /usr/local/bin/app
ENTRYPOINT ["app"]