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 9411212 commit 179ab1d
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 @@ -7,7 +7,7 @@ ENV CGO_ENABLED=1
# ENV GOPROXY="https://goproxy.cn,direct"
COPY go.mod go.sum ./
#安装编译需要的环境gcc等, 同时CGO_ENABLED=1
RUN apk add --no-cache --virtual .build-deps ca-certificates gcc g++ && \
RUN apk add --no-cache gcc musl-dev && \
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 179ab1d

Please sign in to comment.