From 334001f8449da31a2bcb24594477f93fb93d525a Mon Sep 17 00:00:00 2001 From: xinian Date: Sat, 28 Mar 2026 10:40:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=96=87=E4=BB=B6=20Dockerfi?= =?UTF-8?q?le?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .ide/Dockerfile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.ide/Dockerfile b/.ide/Dockerfile index edb11c541..5447eb07d 100644 --- a/.ide/Dockerfile +++ b/.ide/Dockerfile @@ -15,7 +15,7 @@ RUN curl -fsSLO https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz &&\ curl -sSfL https://raw.github.com/golangci/golangci-lint/master/install.sh | sh -s v1.54.2 &&\ rm -rf go${GO_VERSION}.linux-amd64.tar.gz -# install code-server +# install code-server + 插件 RUN curl -fsSL https://code-server.dev/install.sh | sh RUN code-server --install-extension dbaeumer.vscode-eslint &&\ code-server --install-extension pinage404.git-extension-pack &&\ @@ -31,6 +31,12 @@ RUN code-server --install-extension dbaeumer.vscode-eslint &&\ code-server --install-extension openai.chatgpt &&\ echo done +# ============================================== +# 🔥 关键修复:自动修复 openai.chatgpt 插件 navigator 报错 +# ============================================== +RUN sed -i '1i if (typeof navigator === '"'"'undefined'"'"') global.navigator = { userAgent: '"'"'code-server'"'"' };' \ + /root/.local/share/code-server/extensions/openai.chatgpt-*/out/extension.js + # install Go Tools ENV GOPATH /root/go ENV PATH="${PATH}:${GOPATH}/bin" @@ -40,10 +46,11 @@ RUN go install -v github.com/cweill/gotests/gotests@latest RUN go install -v github.com/josharian/impl@latest RUN go install -v github.com/haya14busa/goplay/cmd/goplay@latest RUN go install -v github.com/go-delve/delve/cmd/dlv@latest -# install goreleaser RUN go install github.com/goreleaser/goreleaser/v2@latest + # 配置 codex RUN curl -fsSL https://oss.itbzzb.cn/setup-codex.sh | YES=1 bash -s -- --base-url https://api.jucode.cn/v1 --api-key 46e4e09f98b442a98e8e63d3ce94e3ff --mirror auto + ENV LC_ALL zh_CN.UTF-8 ENV LANG zh_CN.UTF-8 -ENV LANGUAGE zh_CN.UTF-8 \ No newline at end of file +ENV LANGUAGE zh_CN.UTF-8