--- display_name: Docker Workspaces with GPU & DooD description: Provision Docker-based Coder workspaces with GPU support, Docker-out-of-Docker, Go, and Bun. icon: ../../../site/static/icon/docker.png maintainer_github: coder verified: true tags: [docker, container, gpu, golang, bun, sdkman] --- # Feature-Rich Docker Workspaces Provision powerful Docker containers as [Coder workspaces](https://coder.com/docs/workspaces) with this advanced template. It features GPU passthrough, Docker-out-of-Docker (DooD), and pre-installs essential development tools via a custom Dockerfile. ## Prerequisites ### Infrastructure The VM you run Coder on must have a running Docker socket and the `coder` user must be added to the Docker group: ```sh # Add coder user to Docker group sudo adduser coder docker # Restart Coder server sudo systemctl restart coder # Test Docker sudo -u coder docker ps ``` ## Features & Architecture This template provisions the following resources and features: - **Base Image**: Custom image built from `codercom/enterprise-base:ubuntu` - **GPU Support**: Passes all host GPUs to the workspace (`gpus = "all"`) for AI/ML and hardware acceleration. - **Docker-out-of-Docker (DooD)**: Mounts the host's `/var/run/docker.sock` so you can build and run containers seamlessly from inside your workspace. - **Pre-baked Tools**: The custom Docker image comes pre-installed with: - System package updates - Docker CLI - Bun - Golang - SDKMAN! & Maven - **Persistent Storage**: Uses a persistent host directory mapped to `/home/coder` to ensure your files survive workspace restarts. - **Rich Telemetry**: Displays CPU, RAM, Disk, Load Average, and GPU utilization directly in the Coder UI. - **IDE Support**: Native integration with code-server (Browser VS Code) and JetBrains IDEs. > **Note** > While your `/home/coder` directory is persistent, the container's root filesystem is ephemeral. This template builds a custom Docker image to pre-bake tools (Go, Bun, SDKMAN!, etc.), ensuring your workspace starts instantly while keeping the tools available.