feat: add developer container config with packages/ mount
- docker-compose.yml for standalone Docker usage - .devcontainer/devcontainer.json for VS Code/Cursor - Mounts packages/ as /workspace in container - Persists home directory with named volume - SSH and gitconfig mounted read-only Uses ghcr.io/host-uk/core-images/developer:latest Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
dff9bcb43c
commit
63079ed187
2 changed files with 62 additions and 0 deletions
33
.devcontainer/devcontainer.json
Normal file
33
.devcontainer/devcontainer.json
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"name": "Core Developer",
|
||||
"image": "ghcr.io/host-uk/core-images/developer:latest",
|
||||
|
||||
"workspaceMount": "source=${localWorkspaceFolder}/packages,target=/workspace,type=bind",
|
||||
"workspaceFolder": "/workspace",
|
||||
|
||||
"mounts": [
|
||||
"source=${localEnv:HOME}/.ssh,target=/root/.ssh,type=bind,readonly",
|
||||
"source=${localEnv:HOME}/.gitconfig,target=/root/.gitconfig,type=bind,readonly",
|
||||
"source=core-dev-home,target=/root,type=volume"
|
||||
],
|
||||
|
||||
"containerEnv": {
|
||||
"TERM": "xterm-256color",
|
||||
"EDITOR": "nvim"
|
||||
},
|
||||
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"bmewburn.vscode-intelephense-client",
|
||||
"golang.go",
|
||||
"ms-python.python",
|
||||
"rust-lang.rust-analyzer"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
"postCreateCommand": "echo 'Core Developer ready. Workspace: /workspace (packages/)'",
|
||||
|
||||
"remoteUser": "root"
|
||||
}
|
||||
29
docker-compose.yml
Normal file
29
docker-compose.yml
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# Core Developer Environment
|
||||
# Mounts packages/ as /workspace in the container
|
||||
|
||||
services:
|
||||
dev:
|
||||
image: ghcr.io/host-uk/core-images/developer:latest
|
||||
container_name: core-dev
|
||||
hostname: core-dev
|
||||
stdin_open: true
|
||||
tty: true
|
||||
volumes:
|
||||
# Mount packages directory as workspace
|
||||
- ./packages:/workspace
|
||||
# Persist home directory configs
|
||||
- dev-home:/root
|
||||
# SSH keys for git operations
|
||||
- ~/.ssh:/root/.ssh:ro
|
||||
# Git config
|
||||
- ~/.gitconfig:/root/.gitconfig:ro
|
||||
environment:
|
||||
- TERM=xterm-256color
|
||||
- EDITOR=nvim
|
||||
working_dir: /workspace
|
||||
# Keep container running
|
||||
command: ["/bin/zsh"]
|
||||
|
||||
volumes:
|
||||
dev-home:
|
||||
name: core-dev-home
|
||||
Loading…
Add table
Reference in a new issue