https://github.com/thomas-illiet/coder-builder
Builds custom Docker images from the coder repository
https://github.com/thomas-illiet/coder-builder
build coder docker script
Last synced: 2 days ago
JSON representation
Builds custom Docker images from the coder repository
- Host: GitHub
- URL: https://github.com/thomas-illiet/coder-builder
- Owner: thomas-illiet
- Created: 2026-05-25T13:48:55.000Z (29 days ago)
- Default Branch: main
- Last Pushed: 2026-05-25T17:24:20.000Z (29 days ago)
- Last Synced: 2026-05-25T17:31:44.156Z (29 days ago)
- Topics: build, coder, docker, script
- Language: Python
- Homepage:
- Size: 42 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Coder Builder

Coder Builder builds custom Docker images from the [coder/coder](https://github.com/coder/coder) repository while keeping Coder's upstream build path intact. It resolves a Coder ref, prepares an isolated worktree, applies optional file overrides, and builds validated Linux Docker images for the platforms you choose.
## Quick Start
Check the local Docker wrapper path first:
```bash
make doctor
```
Preview a build without cloning, building, or pushing:
```bash
make dry-run REF=latest-release TAG=test PLATFORM=linux
```
Build locally:
```bash
make build REF=latest-release TAG=dev PLATFORM=linux
```
Start the built image and verify Coder answers `/healthz`:
```bash
make smoke-run IMAGE=coder-custom TAG=dev
```
GitHub Actions builds only the `linux/amd64` Docker image and limits the
embedded slim CLI archive to `linux_amd64` plus `darwin_arm64`.
Build an ARM image:
```bash
make build REF=latest-release TAG=dev PLATFORM=arm
```
Publish multi-arch images to GHCR:
```bash
make push IMAGE=ghcr.io/OWNER/REPO/coder TAG=latest PLATFORM=all
```
## Platforms
`PLATFORM` selects Docker image targets:
| Value | Result |
| --- | --- |
| `linux` | Build `linux/amd64` as `:v-amd64`. |
| `arm` | Build `linux/arm64` as `:v-arm64`. |
| `all` | Build `linux/amd64` and `linux/arm64`; with `--push`, publish a multi-arch manifest. |
`arm` is a Linux Docker image target, not a `darwin_arm64` macOS build. To
limit the embedded slim CLI archive to Apple Silicon macOS, use
`EMBEDDED_OS_ARCHES=darwin_arm64`. Windows and Darwin are not Docker image
targets in upstream Coder; they require separate binary/archive workflows.
## Project Layout
```text
.
|-- Makefile # Friendly command surface
|-- scripts/
| |-- build-coder.py # Main build orchestrator
| |-- build-coder-in-docker.py # linux/amd64 Docker wrapper
| |-- smoke-run-coder.py # Runtime startup smoke test
| `-- doctor.py # Dependency checker
|-- Dockerfile # Reusable builder image
|-- overrides/ # Path-mirrored file overrides
|-- docs/ # Project documentation
`-- .github/workflows/ # Smoke checks and GHCR publishing
```
## Documentation
- [Dependencies](docs/dependencies.md)
- [Build Guide](docs/build.md)
- [Configuration](docs/configuration.md)
- [Architecture](docs/architecture.md)
- [Overrides](docs/overrides.md)
- [Build Workflow](docs/workflow.md)