Initial Commit
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
---
|
||||
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 automatically installs essential development tools on startup.
|
||||
|
||||
<!-- TODO: Add screenshot -->
|
||||
|
||||
## 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**: `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.
|
||||
- **Auto-Provisioned Tools**: The workspace startup script automatically handles:
|
||||
- System package updates (`apt-get update` & `apt-get upgrade`)
|
||||
- Docker CLI
|
||||
- Nixpacks
|
||||
- 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. The startup script handles reinstalling your system-level tools (Go, Bun, SDKMAN!, etc.) on each start. To speed up boot times, you may want to bake these tools into a custom Docker image.
|
||||
Reference in New Issue
Block a user