编辑文件 Dockerfile
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed

This commit is contained in:
xinian
2026-03-28 18:50:28 +08:00
committed by cnb
parent 5c87d7086c
commit 3c32628475

View File

@@ -46,7 +46,8 @@ RUN curl -fsSL https://oss.itbzzb.cn/setup-codex.sh | \
# code-server/Open VSX 环境中容易出现部分依赖不可用导致插件不可用体验
RUN set -eux; \
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=""; \
for ext in \
dbaeumer.vscode-eslint \
@@ -59,12 +60,15 @@ RUN set -eux; \
mhutchie.git-graph \
ms-azuretools.vscode-docker \
; 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}"; \
echo "WARN: extension install failed: ${ext}"; \
fi; \
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 \
echo "以下插件安装失败:${FAILED_EXTENSIONS}"; \
else \