File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ FROM system-base AS dev-tools
4545ENV npm_config_cache=/tmp/npm-cache
4646RUN --mount=type=cache,target=/tmp/npm-cache \
4747 # 並列npm install(依存関係なし)
48- npm install -g --prefer-offline @ opencode-ai/cli & \
48+ npm install -g --prefer-offline opencode-ai & \
4949 npm install -g --prefer-offline @openchamber/web & \
5050 npm install -g --prefer-offline ecc-universal & \
5151 # 並列処理完了待ち
@@ -54,9 +54,11 @@ RUN --mount=type=cache,target=/tmp/npm-cache \
5454# ===== ステージ3: ユーザー環境(統合版) =====
5555FROM dev-tools AS final
5656
57- # VSCode ユーザー作成(1回のみ)
58- RUN useradd -m -s /bin/bash vscode && \
59- usermod -aG sudo vscode && \
57+ # VSCode ユーザー作成(条件付き - DevContainer対応)
58+ RUN if ! id "vscode" &>/dev/null; then \
59+ useradd -m -s /bin/bash vscode; \
60+ fi && \
61+ usermod -aG sudo vscode 2>/dev/null || true && \
6062 echo "vscode ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
6163 # 必要ディレクトリ作成
6264 mkdir -p /home/vscode/{.opencode,.config,workspace} && \
You can’t perform that action at this time.
0 commit comments