1.切换到项目根目录 cd ../project1 2.添加Dockerfile文件,内容如下 FROM golang:alpine RUN mkdir -p /home/project1 WORKDIR /home/project1 COPY ./ /home/project1 RUN export GOPROXY=https://proxy.golang.com.cn,direct RUN go build -o /home/project1 main.go diagnostics.go ENTRYPOINT [ "...