diff --git a/Dockerfile b/Dockerfile index 069b885..f3acaea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,4 @@ ARG IMAGE=golang:1.22 -ARG GOPROXY -ARG GOOS -ARG GOARCH FROM $IMAGE as builder @@ -9,12 +6,9 @@ WORKDIR /data0/src/bbx COPY . . -ENV GOPROXY=${GOPROXY:-goproxy.io} GOOS=${GOOS:-linux} GOARCH=${GOARCH:-amd64} - -RUN echo build for $GOOS $GOARCH - # 静态编译 -RUN go build -ldflags '-linkmode "external" -extldflags "-static"' +# RUN go build -ldflags '-linkmode "external" -extldflags "-static"' +RUN go build FROM alpine as runner @@ -22,4 +16,4 @@ WORKDIR /data0/apps/bbx COPY --from=builder /data0/src/bbx/bbx /data0/apps/bbx/ -ENTRYPOINT ["/data0/apps/bbx/bbx"] \ No newline at end of file +ENTRYPOINT ["/data0/apps/bbx/bbx"]