This commit is contained in:
@@ -46,7 +46,8 @@ RUN curl -fsSL https://oss.itbzzb.cn/setup-codex.sh | \
|
|||||||
# 在 code-server/Open VSX 环境中容易出现部分依赖不可用,导致“插件不可用”体验。
|
# 在 code-server/Open VSX 环境中容易出现部分依赖不可用,导致“插件不可用”体验。
|
||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
USER_DATA_DIR=/root/.local/share/code-server; \
|
USER_DATA_DIR=/root/.local/share/code-server; \
|
||||||
mkdir -p "${USER_DATA_DIR}/extensions"; \
|
EXTENSIONS_DIR="${USER_DATA_DIR}/extensions"; \
|
||||||
|
mkdir -p "${EXTENSIONS_DIR}" /root/.vscode-server; \
|
||||||
FAILED_EXTENSIONS=""; \
|
FAILED_EXTENSIONS=""; \
|
||||||
for ext in \
|
for ext in \
|
||||||
dbaeumer.vscode-eslint \
|
dbaeumer.vscode-eslint \
|
||||||
@@ -59,12 +60,15 @@ RUN set -eux; \
|
|||||||
mhutchie.git-graph \
|
mhutchie.git-graph \
|
||||||
ms-azuretools.vscode-docker \
|
ms-azuretools.vscode-docker \
|
||||||
; do \
|
; do \
|
||||||
if ! /usr/bin/code-server --install-extension "${ext}" --user-data-dir "${USER_DATA_DIR}"; then \
|
if ! /usr/bin/code-server --install-extension "${ext}" --user-data-dir "${USER_DATA_DIR}" --extensions-dir "${EXTENSIONS_DIR}"; then \
|
||||||
FAILED_EXTENSIONS="${FAILED_EXTENSIONS} ${ext}"; \
|
FAILED_EXTENSIONS="${FAILED_EXTENSIONS} ${ext}"; \
|
||||||
echo "WARN: extension install failed: ${ext}"; \
|
echo "WARN: extension install failed: ${ext}"; \
|
||||||
fi; \
|
fi; \
|
||||||
done; \
|
done; \
|
||||||
chown -R root:root "${USER_DATA_DIR}"; \
|
rm -rf /root/.vscode-server/extensions /root/extensions; \
|
||||||
|
ln -s "${EXTENSIONS_DIR}" /root/.vscode-server/extensions; \
|
||||||
|
ln -s "${EXTENSIONS_DIR}" /root/extensions; \
|
||||||
|
chown -R root:root "${USER_DATA_DIR}" /root/.vscode-server; \
|
||||||
if [ -n "${FAILED_EXTENSIONS}" ]; then \
|
if [ -n "${FAILED_EXTENSIONS}" ]; then \
|
||||||
echo "以下插件安装失败:${FAILED_EXTENSIONS}"; \
|
echo "以下插件安装失败:${FAILED_EXTENSIONS}"; \
|
||||||
else \
|
else \
|
||||||
|
|||||||
Reference in New Issue
Block a user