mirror of
https://github.com/fosrl/newt.git
synced 2026-03-26 20:46:41 +00:00
chore: Update Dockerfile to enhance Go proxy settings and optimize build process
This commit is contained in:
@@ -13,17 +13,17 @@ COPY go.mod go.sum ./
|
|||||||
|
|
||||||
# Coolify specific Test - set Go proxy to direct to avoid issues
|
# Coolify specific Test - set Go proxy to direct to avoid issues
|
||||||
# ENV GOSUMDB=off
|
# ENV GOSUMDB=off
|
||||||
ENV GOPROXY=direct
|
ENV GOPROXY=https://goproxy.io,https://proxy.golang.org,direct
|
||||||
RUN go env | grep -E 'GOPROXY|GOSUMDB|GOPRIVATE'
|
RUN go env | grep -E 'GOPROXY|GOSUMDB|GOPRIVATE' && go mod download
|
||||||
|
|
||||||
# Download all dependencies
|
# Download all dependencies
|
||||||
RUN go mod download
|
#RUN go mod download
|
||||||
|
|
||||||
# Copy the source code into the container
|
# Copy the source code into the container
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Build the application
|
# 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
|
FROM alpine:3.22 AS runner
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user