update
All checks were successful
/ Make image (push) Successful in 44s

This commit is contained in:
nquidox 2026-04-06 12:03:03 +03:00
parent 8cf8ff70d7
commit 047b61c9a4

View file

@ -1,20 +1,12 @@
FROM golang:1.26.1-alpine3.23 AS builder FROM golang:1.26.1-alpine3.23 AS builder
RUN apk add --no-cache git
ENV GOPRIVATE=repo.nqws.ru/*
ENV GONOSUMDB=repo.nqws.ru/*
WORKDIR /app WORKDIR /app
COPY go.mod go.sum ./ COPY go.mod go.sum ./
RUN go mod download
RUN --mount=type=secret,id=git_creds,dst=/root/.git-credentials,mode=0600 \
git config --global credential.helper store && \
go mod download
COPY . . COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o main "./cmd" RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags="-s -w" -o main "./cmd"
FROM alpine:3.23 FROM alpine:3.23
RUN apk add --no-cache \ RUN apk add --no-cache \
@ -26,4 +18,4 @@ COPY --from=builder /app/main /usr/local/bin/app
RUN chmod +x /usr/local/bin/app RUN chmod +x /usr/local/bin/app
ENTRYPOINT ["app"] ENTRYPOINT ["app"]