This commit is contained in:
parent
8cf8ff70d7
commit
047b61c9a4
1 changed files with 3 additions and 11 deletions
12
Dockerfile
12
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 \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue