mirror of
https://github.com/fosrl/newt.git
synced 2026-09-18 03:49:07 +02:00
chore: Update Dockerfile to enhance Go proxy settings and optimize build process
Former-commit-id: 922591b26928d3125977e13e5d9cdf5b87cff3a8
This commit is contained in:
+4
-4
@@ -13,17 +13,17 @@ COPY go.mod go.sum ./
|
||||
|
||||
# Coolify specific Test - set Go proxy to direct to avoid issues
|
||||
# ENV GOSUMDB=off
|
||||
ENV GOPROXY=direct
|
||||
RUN go env | grep -E 'GOPROXY|GOSUMDB|GOPRIVATE'
|
||||
ENV GOPROXY=https://goproxy.io,https://proxy.golang.org,direct
|
||||
RUN go env | grep -E 'GOPROXY|GOSUMDB|GOPRIVATE' && go mod download
|
||||
|
||||
# Download all dependencies
|
||||
RUN go mod download
|
||||
#RUN go mod download
|
||||
|
||||
# Copy the source code into the container
|
||||
COPY . .
|
||||
|
||||
# Build the application
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o /newt
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /newt
|
||||
|
||||
FROM alpine:3.22 AS runner
|
||||
|
||||
|
||||
Reference in New Issue
Block a user