build files
All checks were successful
/ Make image (push) Successful in 36s

This commit is contained in:
nquidox 2026-04-06 13:44:22 +03:00
parent 099b03a862
commit 7fbc196c84
2 changed files with 61 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"]