diff --git a/.devcontainer/backend/devcontainer.json b/.devcontainer/backend/devcontainer.json index def985b625b..da101e05245 100644 --- a/.devcontainer/backend/devcontainer.json +++ b/.devcontainer/backend/devcontainer.json @@ -11,7 +11,7 @@ "moby": "true" } }, - "postCreateCommand": "./init.sh", + "postCreateCommand": "dotnet build src/All.slnx", "customizations": { "vscode": { "extensions": [ @@ -27,7 +27,8 @@ "openai.chatgpt" ], "settings": { - "dotnet.defaultSolution": "src/All.slnx" + "dotnet.defaultSolution": "src/All.slnx", + "terminal.integrated.defaultProfile.linux": "zsh" } } } diff --git a/.devcontainer/backend/dockerfile b/.devcontainer/backend/dockerfile index e05c01b1168..b95937d66ac 100644 --- a/.devcontainer/backend/dockerfile +++ b/.devcontainer/backend/dockerfile @@ -41,6 +41,9 @@ RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \ # Install Yarn RUN npm install -g yarn +# Install Claude Code (as vscode user so it installs to their home directory) +RUN su - vscode -c "curl -fsSL https://claude.ai/install.sh | bash" + # Install GitHub CLI RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg \ && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ @@ -54,6 +57,21 @@ RUN curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | && apt-get update \ && apt-get install -y azure-cli +# Install zsh plugins for better shell experience +RUN git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions /home/vscode/.oh-my-zsh/custom/plugins/zsh-autosuggestions \ + && git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting /home/vscode/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting \ + && chown -R vscode:vscode /home/vscode/.oh-my-zsh/custom/plugins/zsh-autosuggestions \ + && chown -R vscode:vscode /home/vscode/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting + +# Configure Oh My Zsh: agnoster theme, useful plugins, claude-d alias +RUN sed -i 's/ZSH_THEME=".*"/ZSH_THEME="agnoster"/' /home/vscode/.zshrc \ + && sed -i 's/plugins=(.*)/plugins=(git gh dotnet docker zsh-autosuggestions zsh-syntax-highlighting)/' /home/vscode/.zshrc \ + && echo 'export PATH="$HOME/.local/bin:$PATH"' >> /home/vscode/.zshrc \ + && echo 'alias claude-d="claude --dangerously-skip-permissions"' >> /home/vscode/.zshrc + +# Set zsh as default shell for vscode user +RUN chsh -s /bin/zsh vscode + # Clean up RUN rm dotnet-install.sh \ && apt-get clean \ diff --git a/.devcontainer/frontend/devcontainer.json b/.devcontainer/frontend/devcontainer.json index 75f4e7731b4..7b27a14909e 100644 --- a/.devcontainer/frontend/devcontainer.json +++ b/.devcontainer/frontend/devcontainer.json @@ -1,6 +1,9 @@ { "name": "ChilliCream Frontend", - "image": "mcr.microsoft.com/devcontainers/javascript-node:22-bookworm", + "build": { + "dockerfile": "dockerfile", + "context": "." + }, "runArgs": ["--shm-size=512m"], "features": { "ghcr.io/devcontainers/features/github-cli:1": {} @@ -17,9 +20,12 @@ "esbenp.prettier-vscode", "anthropic.claude-code", "openai.chatgpt" - ] + ], + "settings": { + "terminal.integrated.defaultProfile.linux": "zsh" + } } }, "forwardPorts": [3000], - "postCreateCommand": "node --version && npm --version && npm i -g @anthropic-ai/claude-code" + "postCreateCommand": "cd website && yarn" } diff --git a/.devcontainer/frontend/dockerfile b/.devcontainer/frontend/dockerfile new file mode 100644 index 00000000000..9a37dd1714e --- /dev/null +++ b/.devcontainer/frontend/dockerfile @@ -0,0 +1,19 @@ +FROM mcr.microsoft.com/devcontainers/javascript-node:22-bookworm + +# Install Claude Code (as node user so it installs to their home directory) +RUN su - node -c "curl -fsSL https://claude.ai/install.sh | bash" + +# Install zsh plugins for better shell experience +RUN git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions /home/node/.oh-my-zsh/custom/plugins/zsh-autosuggestions \ + && git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting /home/node/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting \ + && chown -R node:node /home/node/.oh-my-zsh/custom/plugins/zsh-autosuggestions \ + && chown -R node:node /home/node/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting + +# Configure Oh My Zsh: agnoster theme, useful plugins, claude-d alias +RUN sed -i 's/ZSH_THEME=".*"/ZSH_THEME="agnoster"/' /home/node/.zshrc \ + && sed -i 's/plugins=(.*)/plugins=(git gh node npm docker zsh-autosuggestions zsh-syntax-highlighting)/' /home/node/.zshrc \ + && echo 'export PATH="$HOME/.local/bin:$PATH"' >> /home/node/.zshrc \ + && echo 'alias claude-d="claude --dangerously-skip-permissions"' >> /home/node/.zshrc + +# Set zsh as default shell +RUN chsh -s /bin/zsh node