fix: startup shell call

This commit is contained in:
engigu
2026-03-16 11:55:14 +08:00
parent 6e5af20d93
commit 7298ba511a
3 changed files with 16 additions and 7 deletions
+1
View File
@@ -14,5 +14,6 @@ RUN sed -i 's@deb.debian.org@mirrors.tuna.tsinghua.edu.cn@g' /etc/apt/sources.li
&& apt-get install -y --no-install-recommends \
tzdata git curl wget vim htop ca-certificates rsync \
&& curl https://mise.run | MISE_INSTALL_PATH=/usr/local/bin/mise sh \
&& mkdir -p /opt/mise-base \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /root/.cache/mise /opt/mise-base/cache/*
+7 -3
View File
@@ -27,10 +27,14 @@ mkdir -p \
# ============================
# Mise 环境初始化
# ============================
log "Syncing mise environment from base..."
mkdir -p "$MISE_DIR"
rsync -a --ignore-existing /opt/mise-base/ "$MISE_DIR/" || true
log "Mise environment synced"
if [ -d "/opt/mise-base" ]; then
log "Syncing mise environment from base..."
rsync -a --ignore-existing /opt/mise-base/ "$MISE_DIR/" || true
log "Mise environment synced"
else
log "No base mise environment found, skipping sync"
fi
# ============================
# 环境变量注入
+8 -4
View File
@@ -28,11 +28,15 @@ mkdir -p \
# Mise 环境初始化
# ============================
# 始终尝试同步基础环境(以补充用户挂载卷中可能缺失的文件,如 config.toml
log "Syncing mise environment from base..."
mkdir -p "$MISE_DIR"
# 使用 rsync 同步: -a 归档模式, --ignore-existing 不覆盖已存在文件
rsync -a --ignore-existing /opt/mise-base/ "$MISE_DIR/" || true
log "Mise environment synced"
if [ -d "/opt/mise-base" ]; then
log "Syncing mise environment from base..."
# 使用 rsync 同步: -a 归档模式, --ignore-existing 不覆盖已存在文件
rsync -a --ignore-existing /opt/mise-base/ "$MISE_DIR/" || true
log "Mise environment synced"
else
log "No base mise environment found, skipping sync"
fi
# ============================
# 环境变量注入