display_name, description, icon, maintainer_github, verified, tags
| display_name | description | icon | maintainer_github | verified | tags | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| C and C++ Development Workspace | Docker workspace for C and C++ development with GCC, Clang, CMake, and Claude Code. | /icon/cpp.svg | sirblob | false |
|
C and C++ Development Workspace
Docker workspace for C and C++ development with GCC, Clang, CMake, and Claude Code.
Provisions a Docker container as a Coder workspace with selectable GPU passthrough, Docker-out-of-Docker, and a persistent home directory.
Preinstalled tools
- GCC and G++ via build-essential
- Clang, clangd, clang-format, and clang-tidy
- CMake, Ninja, Autotools, and ccache
- GDB, LLDB, and Valgrind
- Claude Code
- Docker CLI for Docker-out-of-Docker
- Gitea CLI (
tea) - code-server and JetBrains Toolbox support
Parameters
| Parameter | Description | Default |
|---|---|---|
GPU Assignment |
Which GPU(s) to attach: GPU 0, GPU 1, or both. GPU 1 is shared with the Ollama and Immich stacks. | GPU 0 |
Prerequisites
The host needs the NVIDIA container toolkit for GPU passthrough. Coder itself runs as a container and creates workspaces through the host's Docker socket, so its service needs the socket mounted and the host docker group added:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
group_add:
- "987"
Workspaces get the same GID through the docker_group_id template variable, which defaults to 987. Confirm the host GID with getent group docker and override the variable if it differs.
Ollama
OLLAMA_HOST is preset to http://host.docker.internal:11434. Verify with:
curl "$OLLAMA_HOST/api/tags"
Gitea
The tea CLI manages repositories, issues, and pull requests from the workspace:
tea login add --name sirblob --url https://git.sirblob.co --token <token>
tea repos list
Docker-out-of-Docker lets you build and push images to the registry:
docker login git.sirblob.co -u <user> -p <token>
docker build -t git.sirblob.co/<user>/<image>:<tag> .
docker push git.sirblob.co/<user>/<image>:<tag>
Updates
The image is built with the base packages already upgraded, and the agent runs apt-get update and apt-get upgrade on every workspace start so a long-lived container keeps picking up security updates.
Persistence
/home/coder is mapped to a host directory and survives workspace restarts. The rest of the root filesystem is ephemeral, so every preinstalled tool lives under /opt or /usr/local instead of the home directory.
Files
| File | Contents |
|---|---|
main.tf |
Providers, data sources, and shared locals |
parameters.tf |
Workspace parameters |
agent.tf |
Coder agent, startup script, and metadata |
apps.tf |
code-server and JetBrains modules |
container.tf |
Docker image build and container resource |
Dockerfile |
Workspace image |