This commit is contained in:
awei
2025-06-15 17:13:26 +08:00
parent 21f4026106
commit cb8fe9f52e
11 changed files with 153 additions and 210 deletions

20
gobaseimg/Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
# 使用华为云镜像源的 golang 1.24 作为基础镜像
FROM swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/library/golang:1.24.3-alpine3.21
# 设置环境变量
ENV GOPROXY=https://goproxy.cn,direct
ENV GO111MODULE=on
# 安装必要的 Go 工具
RUN go install golang.org/x/tools/gopls@latest && \
go install github.com/go-delve/delve/cmd/dlv@latest
# 设置工作目录
WORKDIR /workspace
# 设置容器启动命令
CMD ["/bin/bash"]