diff --git a/Dockerfile b/Dockerfile index 0254a2b..2fafaf6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,12 @@ 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 COPY go.mod go.sum ./ - -RUN --mount=type=secret,id=git_creds,dst=/root/.git-credentials,mode=0600 \ - git config --global credential.helper store && \ - go mod download - +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 \ @@ -26,4 +18,4 @@ COPY --from=builder /app/main /usr/local/bin/app RUN chmod +x /usr/local/bin/app -ENTRYPOINT ["app"] +ENTRYPOINT ["app"] \ No newline at end of file