Spaces:
Sleeping
Sleeping
切换官方市场
Browse files- Dockerfile +13 -0
Dockerfile
CHANGED
|
@@ -20,9 +20,22 @@ RUN apt-get update && \
|
|
| 20 |
wget \
|
| 21 |
git \
|
| 22 |
iputils-ping \
|
|
|
|
| 23 |
sudo && \
|
| 24 |
rm -rf /var/lib/apt/lists/*
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
# 指定 Go 版本号
|
| 27 |
ARG GO_VERSION=1.25.1
|
| 28 |
RUN wget -q https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz && \
|
|
|
|
| 20 |
wget \
|
| 21 |
git \
|
| 22 |
iputils-ping \
|
| 23 |
+
jq \
|
| 24 |
sudo && \
|
| 25 |
rm -rf /var/lib/apt/lists/*
|
| 26 |
|
| 27 |
+
# 切换官方市场(使用 jq 向 product.json 追加 extensionsGallery 字段)
|
| 28 |
+
RUN jq '. += { \
|
| 29 |
+
"extensionsGallery": { \
|
| 30 |
+
"serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery", \
|
| 31 |
+
"cacheUrl": "https://vscode.blob.core.windows.net/gallery/index", \
|
| 32 |
+
"itemUrl": "https://marketplace.visualstudio.com/items", \
|
| 33 |
+
"controlUrl": "", \
|
| 34 |
+
"recommendationsUrl": "" \
|
| 35 |
+
} \
|
| 36 |
+
}' /usr/lib/code-server/lib/vscode/product.json > /tmp/product.json \
|
| 37 |
+
&& mv /tmp/product.json /usr/lib/code-server/lib/vscode/product.json
|
| 38 |
+
|
| 39 |
# 指定 Go 版本号
|
| 40 |
ARG GO_VERSION=1.25.1
|
| 41 |
RUN wget -q https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz && \
|