|
| 1 | +FROM mcr.microsoft.com/devcontainers/javascript-node:22-bookworm |
| 2 | + |
| 3 | +# Suppress Corepack's "about to download" prompt during yarn activation |
| 4 | +ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0 |
| 5 | + |
| 6 | +# Enable Corepack so the Yarn version from package.json's packageManager field is used |
| 7 | +RUN corepack enable |
| 8 | + |
| 9 | +# Install bubblewrap (sandbox dependency for Codex CLI) |
| 10 | +RUN apt-get update && apt-get install -y bubblewrap \ |
| 11 | + && apt-get clean && rm -rf /var/lib/apt/lists/* |
| 12 | + |
| 13 | +# Install Playwright's OS dependencies for Chromium (version-independent apt packages). |
| 14 | +# The browser binary itself is downloaded in postCreateCommand so it matches the |
| 15 | +# Playwright version resolved from yarn.lock. |
| 16 | +RUN npx -y playwright install-deps chromium \ |
| 17 | + && apt-get clean && rm -rf /var/lib/apt/lists/* |
| 18 | + |
| 19 | +# Install GitHub Copilot CLI and Codex CLI |
| 20 | +RUN npm install -g @github/copilot @openai/codex |
| 21 | + |
| 22 | +# Install Claude Code (as node user so it installs to their home directory) |
| 23 | +RUN su - node -c "curl -fsSL https://claude.ai/install.sh | bash" |
| 24 | + |
| 25 | +# Install zsh plugins for better shell experience |
| 26 | +RUN git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions /home/node/.oh-my-zsh/custom/plugins/zsh-autosuggestions \ |
| 27 | + && git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting /home/node/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting \ |
| 28 | + && chown -R node:node /home/node/.oh-my-zsh/custom/plugins/zsh-autosuggestions \ |
| 29 | + && chown -R node:node /home/node/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting |
| 30 | + |
| 31 | +# Configure Oh My Zsh: agnoster theme, useful plugins, claude-d alias |
| 32 | +RUN sed -i 's/ZSH_THEME=".*"/ZSH_THEME="agnoster"/' /home/node/.zshrc \ |
| 33 | + && sed -i 's/plugins=(.*)/plugins=(git gh node npm docker zsh-autosuggestions zsh-syntax-highlighting)/' /home/node/.zshrc \ |
| 34 | + && echo 'export PATH="$HOME/.local/bin:$PATH"' >> /home/node/.zshrc \ |
| 35 | + && echo 'alias claude-d="claude --dangerously-skip-permissions"' >> /home/node/.zshrc \ |
| 36 | + && echo 'alias codex-a="codex --full-auto"' >> /home/node/.zshrc \ |
| 37 | + && echo 'alias codex-d="codex --dangerously-bypass-approvals-and-sandbox"' >> /home/node/.zshrc \ |
| 38 | + && echo 'DEFAULT_USER=$USER' >> /home/node/.zshrc |
| 39 | + |
| 40 | +# Set zsh as default shell |
| 41 | +RUN chsh -s /bin/zsh node |
0 commit comments