2 Commits

Author SHA1 Message Date
4c12baef28 feat: Update devcontainer setup with Dockerfile and improved script for pre-commit hooks
Some checks are pending
Lint / pre-commit Linting (push) Waiting to run
2025-12-26 01:17:16 +01:00
eb3a74b709 feat: Add devcontainer configuration and setup script for Gemini Agent
All checks were successful
Lint / pre-commit Linting (push) Successful in 1m45s
2025-12-25 11:12:41 +01:00
3 changed files with 58 additions and 0 deletions

7
.devcontainer/Dockerfile Normal file
View File

@@ -0,0 +1,7 @@
# .devcontainer/Dockerfile
FROM mcr.microsoft.com/devcontainers/javascript-node:1-20-bullseye
# CACHED INSTALLATION:
# Install global NPM packages here. This creates a cached Docker layer.
# We use 'su node' to ensure permissions are correct for the non-root user.
RUN su node -c "npm install -g @google/gemini-cli"

View File

@@ -0,0 +1,40 @@
{
"name": "Gemini Agent Quality Ops",
"build": {
"dockerfile": "Dockerfile"
},
"features": {
"ghcr.io/devcontainers/features/python:1": {
"version": "3.11",
"installTools": true,
"optimize": true
},
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/git-lfs:1": {},
"ghcr.io/devcontainers-extra/features/pre-commit:2": {}
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"esbenp.prettier-vscode",
"vitest.explorer",
"google.gemini-cli-vscode-ide-companion",
"google.geminicodeassist"
],
"settings": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
},
"postStartCommand": "bash .devcontainer/setup.sh",
"remoteUser": "vscode",
"updateRemoteUserUID": true,
"mounts": [
"source=pipx-venvs,target=/home/node/.local/share/pipx,type=volume",
"source=pipx-bin,target=/home/node/.local/bin,type=volume",
"source=pre-commit-cache,target=/home/node/.cache/pre-commit,type=volume",
"source=${localEnv:USERPROFILE}/.gemini,target=/home/node/.gemini,type=bind"
]
}

11
.devcontainer/setup.sh Normal file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
# 1. Fix Git Permissions (Critical in Docker)
git config --global --add safe.directory $(pwd)
# 2. Re-connect Git Hooks
if command -v pre-commit &> /dev/null; then
pre-commit install
else
echo "⚠️ Warning: pre-commit not found. Skipping hook installation."
fi