A fully-featured development container with secure 1Password credential management. Works with VS Code Dev Containers or standalone Docker.
| Tool | Version | Purpose |
|---|---|---|
| Node.js | 20.x | JavaScript/TypeScript runtime |
| npm | 10.x | Node package manager |
| Python | 3.11 | Python runtime |
| pip | Latest | Python package manager |
| Tool | Purpose |
|---|---|
| AWS CLI | Amazon Web Services |
| Google Cloud SDK | Google Cloud Platform |
| Azure CLI | Microsoft Azure |
| Tool | Purpose |
|---|---|
| Docker CLI | Container management (Docker-in-Docker) |
| Docker Compose | Multi-container orchestration |
GitHub CLI (gh) |
GitHub operations, PR management |
| Git | Version control |
| Claude Code | AI-assisted development |
| Tool | Purpose |
|---|---|
1Password CLI (op) |
Secure credential management |
| ssh-agent | SSH key management |
Run setup-ssh in the container terminal. First time requires:
- 1Password sign-in address (e.g.,
my.1password.eu) - Secret key (starts with
A3-) - Master password
After first setup, only master password needed (account config persists via mount).
Set on your host machine:
export OP_SERVICE_ACCOUNT_TOKEN="ops_your_token_here"Credentials load automatically on container start.
- Docker Desktop or Docker Engine
- VS Code with Dev Containers extension (optional)
- 1Password account with a vault containing:
Github SSH Key- SSH key item with private keyGitHub Token- API token item
Create a vault called DevContainer with:
SSH Key:
- Item name:
Github SSH Key - Type: SSH Key
- Add your private key
GitHub Token:
- Item name:
GitHub Token - Type: API Credential
- Field name:
token - Value: Your GitHub PAT (needs
reposcope)
code /path/to/devcontainer-1passwordThen: Cmd+Shift+P → "Dev Containers: Reopen in Container"
In the container terminal:
setup-sshFollow the prompts to sign in to 1Password.
clone-reposInteractive selector shows your GitHub repos sorted by recent activity.
| Host Path | Container Path | Purpose |
|---|---|---|
~/.claude/ |
/home/devuser/.claude/ |
Claude Code settings |
~/.config/op/ |
/home/devuser/.config/op/ |
1Password account config (persists across rebuilds) |
/var/run/docker.sock |
/var/run/docker.sock |
Docker-in-Docker |
| Aspect | Implementation |
|---|---|
| Master password | Never stored, entered each session |
| SSH keys | Fetched from 1Password, loaded into ssh-agent only |
| GitHub token | Fetched from 1Password, passed to gh auth |
| Account config | Stored on host ~/.config/op/, contains no secrets |
| Service account token | Optional, for fully automatic setup |
.devcontainer/
├── Dockerfile # Container image definition
├── devcontainer.json # VS Code Dev Container config
├── setup-ssh.sh # 1Password auth & credential loading
├── clone-repos.sh # Interactive GitHub repo cloning
└── tests/
├── test-image.sh # Container test suite
└── run-tests.sh # Build & test runner
Run tests without VS Code:
.devcontainer/tests/run-tests.sh --verboseRun tests inside container:
.devcontainer/tests/test-image.sh| Command | Description |
|---|---|
setup-ssh |
Authenticate with 1Password, load SSH key & GitHub token |
setup-ssh --interactive |
Force interactive mode (skip service account) |
clone-repos |
Interactive GitHub repo selector |
Run setup-ssh and follow the prompts to add your account.
# Check SSH key is loaded
ssh-add -l
# Re-run setup if needed
setup-ssh# Check auth status
gh auth status
# Re-run setup
setup-sshThis is expected. The 1Password account config persists, but you need to re-enter your master password after rebuild:
setup-sshMIT