FROM registry.ngaiot.com/base-images/golang:1.20-fs-10 WORKDIR /app/ COPY . . RUN pwd && ls RUN go env -w GOPROXY=https://goproxy.cn RUN go env -w GO111MODULE=on RUN CGO_ENABLED=0 go build -a -v -o app.exe main.go FROM registry.ngaiot.com/base-images/golang:1.20-fs-10 WORKDIR /app/ COPY --from=0 /app/app.exe /app COPY --from=0 /app/configFiles /app CMD ["/app/app.exe"]