Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
twbworld committed Jan 8, 2024
1 parent 3f5182b commit 62a88df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ENV GO111MODULE=on
# ENV GOPROXY="https://goproxy.cn,direct"
COPY go.mod go.sum ./
#安装编译需要的环境gcc等, 同时CGO_ENABLED=1
RUN apk add build-base && \
RUN apk add --no-cache build-base --virtual .build-deps ca-certificates gcc g++ && \
go mod download
COPY . .
RUN CGO_ENABLED=1 GOOS=linux GOARCH=$TARGETARCH go build -ldflags="-s -w" -installsuffix cgo -o server . && \
Expand Down

0 comments on commit 62a88df

Please sign in to comment.