logo
12
2
Login
ci: use prebuild image

云原生 Go 1.24 开发环境

使用

$: vscode: - docker: image: docker.cnb.cool/examples/language/golang-1.24 services: - vscode - docker stages: - name: ls script: ls

包含软件:

  • Go 1.24
  • code-server
  • build-essential
  • curl
  • wget
  • git
  • gcc
  • libc6-dev
  • pkg-config
  • libssl-dev
  • ca-certificates
  • unzip
  • lsof
  • nload
  • htop
  • net-tools
  • dnsutils
  • openssh-server
  • vim

Go 开发工具:

  • gopkgs
  • go-outline
  • gotests
  • gomodifytags
  • impl
  • goplay
  • dlv (Delve 调试器)
  • golangci-lint
  • gopls (Go Language Server)
  • goimports
  • staticcheck
  • protoc-gen-go
  • protoc-gen-go-grpc

包含 VS Code 插件:

  • golang.go
  • cnbcool.cnb-welcome
  • formulahendry.code-runner
  • ms-kubernetes-tools.vscode-kubernetes-tools
  • tencent-cloud.coding-copilot

环境变量配置:

  • GOROOT: /usr/local/go
  • GOPATH: /root/go
  • GO111MODULE: on
  • GO_BINARY_PATH: /usr/local/go/bin/go