0605
This commit is contained in:
20
gobaseimg/Dockerfile
Normal file
20
gobaseimg/Dockerfile
Normal 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"]
|
||||
Reference in New Issue
Block a user