Dockerfile 971 B

123456789101112131415161718192021222324252627
  1. FROM mcr.microsoft.com/devcontainers/go:1-1.20-bullseye
  2. # [Optional] Uncomment this section to install additional OS packages.
  3. # RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
  4. # && apt-get -y install --no-install-recommends <your-package-list-here>
  5. # [Optional] Uncomment the next lines to use go get to install anything else you need
  6. # USER vscode
  7. # RUN go get -x <your-dependency-or-tool>
  8. # USER root
  9. # [Optional] Uncomment this line to install global node packages.
  10. # RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1
  11. RUN GO111MODULE=on go install github.com/zeromicro/go-zero/tools/goctl@latest
  12. RUN goctl env check --install --verbose --force
  13. # 国内设置代理
  14. # go env -w GO111MODULE=on
  15. # go env -w GOPROXY=https://goproxy.cn,direct
  16. # mkdir demo1 && cd demo1
  17. # go mod init demo1_module
  18. # go get -u github.com/zeromicro/go-zero@latest
  19. # vscode 安装 goctl 插件 xiaoxin-technology.goctl