feat: Add devcontainer configuration and setup script for Gemini Agent
All checks were successful
Lint / pre-commit Linting (push) Successful in 1m45s
All checks were successful
Lint / pre-commit Linting (push) Successful in 1m45s
This commit is contained in:
0
.devcontainer/Dockerfile
Normal file
0
.devcontainer/Dockerfile
Normal file
42
.devcontainer/devcontainer.json
Normal file
42
.devcontainer/devcontainer.json
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
"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/pipx-package:1": {
|
||||||
|
"packages": "pre-commit, ruff"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"postCreateCommand": "npm install",
|
||||||
|
"postStartCommand": "bash .devcontainer/setup.sh",
|
||||||
|
"remoteUser": "node",
|
||||||
|
"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:HOME}/.gemini,target=/home/node/.gemini,type=bind"
|
||||||
|
]
|
||||||
|
}
|
||||||
16
.devcontainer/setup.sh
Normal file
16
.devcontainer/setup.sh
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# 1. Fix Git Permissions (Critical in Docker)
|
||||||
|
sudo chown -R $(whoami) .git
|
||||||
|
git config --global --add safe.directory $(pwd)
|
||||||
|
|
||||||
|
# 2. Re-connect Git Hooks
|
||||||
|
# 'pre-commit install' is idempotent (it checks if the hook exists and exits fast).
|
||||||
|
# It's safe to run on every start.
|
||||||
|
if command -v pre-commit &> /dev/null; then
|
||||||
|
pre-commit install
|
||||||
|
else
|
||||||
|
echo "⚠️ Warning: pre-commit not found. Skipping hook installation."
|
||||||
|
fi
|
||||||
|
|
||||||
|
# We REMOVED 'npm install' from here to speed up your daily workflow.
|
||||||
Reference in New Issue
Block a user