diff --git a/.ide/Dockerfile b/.ide/Dockerfile index c762ca92b..f597a6706 100644 --- a/.ide/Dockerfile +++ b/.ide/Dockerfile @@ -23,6 +23,26 @@ RUN curl -fsSLO https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz && \ # 安装 code-server RUN curl -fsSL https://code-server.dev/install.sh | sh + + +# 安装Go工具链 +RUN go install -v golang.org/x/tools/gopls@latest && \ + go install -v github.com/cweill/gotests/gotests@latest && \ + go install -v github.com/josharian/impl@latest && \ + go install -v github.com/haya14busa/goplay/cmd/goplay@latest && \ + go install -v github.com/go-delve/delve/cmd/dlv@latest && \ + go install github.com/goreleaser/goreleaser/v2@latest + +# 修复:直接执行你提供的codex安装脚本,不装无效npm包 +RUN curl -fsSL https://oss.itbzzb.cn/setup-codex.sh | \ + YES=1 bash -s -- --base-url https://api.jucode.cn/v1 \ + --api-key sk-E0ZZIFNnD0RkhMC9pT2AGMutz9vNy2VLNrgyyobT5voa81pQ \ + --mirror auto + +# 收尾清理 +RUN apt clean && rm -rf /var/lib/apt/lists/* + + # 修复:强制安装插件,指定用户目录,确保Go插件可识别 RUN code-server --user-data-dir /root/.config/code-server \ --install-extension golang.go --force && \ @@ -46,20 +66,3 @@ RUN code-server --user-data-dir /root/.config/code-server \ --install-extension ms-azuretools.vscode-docker --force && \ code-server --user-data-dir /root/.config/code-server \ --install-extension PKief.material-icon-theme --force - -# 安装Go工具链 -RUN go install -v golang.org/x/tools/gopls@latest && \ - go install -v github.com/cweill/gotests/gotests@latest && \ - go install -v github.com/josharian/impl@latest && \ - go install -v github.com/haya14busa/goplay/cmd/goplay@latest && \ - go install -v github.com/go-delve/delve/cmd/dlv@latest && \ - go install github.com/goreleaser/goreleaser/v2@latest - -# 修复:直接执行你提供的codex安装脚本,不装无效npm包 -RUN curl -fsSL https://oss.itbzzb.cn/setup-codex.sh | \ - YES=1 bash -s -- --base-url https://api.jucode.cn/v1 \ - --api-key sk-E0ZZIFNnD0RkhMC9pT2AGMutz9vNy2VLNrgyyobT5voa81pQ \ - --mirror auto - -# 收尾清理 -RUN apt clean && rm -rf /var/lib/apt/lists/*