Sign inSign up

julieio/agent-devcontainer

By julieio

•Updated 11 days ago

Custom docker image for my coding agent in a devcontainer

Image
0

2.6K

julieio/agent-devcontainer repository overview

⁠agent-devcontainer

A devcontainer base image for agent-assisted development. Coding agents (e.g. Claude Code) run through the IDE, not inside this image — this docker.io/julieio/agent-devcontainer just provides the OS tooling a devcontainer needs.

For details, please visit https://github.com/julie-ng/agent-devcontainer⁠

⁠Included Tools

ToolWhy
jqJSON handling
yq (mikefarah/yq, the Go binary — not apt's Python one)YAML handling
ghGitHub CLI
kubectlTalk to a Kubernetes cluster
kindLocal Kubernetes cluster
openssh-clientssh-keygen and general SSH usage
unzip, bzip2, less, vim, ca-certificates, gnupgGeneral sandbox hygiene
Python 3.12Added via a devcontainer feature, not baked into the image (see below)

Base image: mcr.microsoft.com/devcontainers/javascript-node:22, for devcontainer-spec compatibility (non-root node user, sudo, features).

⁠Python

Python is not baked into the image. It's added declaratively via the official ghcr.io/devcontainers/features/python:1 feature in devcontainer.json (pinned to 3.12), keeping the version visible and diffable in devcontainer.json rather than buried in a Dockerfile RUN step.

⁠Example devcontainer.json

Copy devcontainer.sample.json⁠ to your project's .devcontainer/devcontainer.json and adjust paths/mounts as needed.

{
  "name": "Agent Devcontainer",
  "image": "docker.io/julieio/agent-devcontainer:latest",
  "workspaceMount": "source=${localWorkspaceFolder},target=/Users/<user>/path/to/project,type=bind,consistency=cached",
  "workspaceFolder": "/Users/<user>/path/to/project",
  "features": {
    "ghcr.io/devcontainers/features/python:1": {
      "version": "3.12"
    }
  },
  "mounts": [
    "source=${localEnv:HOME}/.claude,target=/home/node/.claude,type=bind,consistency=cached"
  ],
  "postCreateCommand": "npm install",
  "dotfiles": {
    "repository": "https://github.com/<USERNAME>/dotfiles.git",
    "targetPath": "~/dotfiles",
    "installCommand": "~/dotfiles/setup.sh"
  }
}
⁠Claude Code Setup

The agent-devcontainer itself is agnostic. But the devcontainer.json file contains Claude code specific setup.

⁠Map this project's memories

In order for Claude to pull the project specific memories, the container needs to work in a directory path that matches the host path:

Path
Project Path/Users/alice/workspace/my-project
Claude memory path~/.claude/projects/-Users-alice-workspace-my-project
⁠Mount all memories

Mounting ~/.claude carries over its config into the container and memorials from all claude projects. This intentional I can ask Claude to check how project X handled problem Y, etc.

⁠License

MIT

Tag summary

Content type

Image

Digest

sha256:76f48662e…

Size

673.4 MB

Last updated

11 days ago

docker pull julieio/agent-devcontainer