This repository has been archived on 2025-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Files
dgvigil-keebs/DOCKER_README.md
Dave Vigil d6d33e5f3e
Some checks failed
Build QMK Firmware with Docker / build (draculad, draculad) (push) Waiting to run
Build QMK Firmware with Docker / build (iris, keebio/iris/rev8) (push) Waiting to run
Build QMK Firmware with Docker / build (scottogame, handwired/scottokeebs/scottogame) (push) Waiting to run
Build QMK Firmware with Docker / build (sweep, ferris/sweep) (push) Waiting to run
Build QMK Firmware with Docker / build (swoop, bluebell/swoop) (push) Waiting to run
Build QMK Firmware with Docker / release (push) Blocked by required conditions
Compile my Keebs / lint-and-compile (push) Failing after 1s
Added dockerfilE/container
2025-07-14 23:54:16 -05:00

99 lines
2.6 KiB
Markdown

# QMK Firmware Docker Build Environment
This repository includes a custom Docker setup for building QMK firmware in CI/CD environments.
## Files
- `Dockerfile` - Custom Docker image for QMK firmware builds
- `.dockerignore` - Excludes unnecessary files from Docker build context
- `build.sh` - Convenience script for building firmware locally
- `.github/workflows/docker-build.yml` - GitHub Actions workflow using the custom Docker image
## Features
- Based on Ubuntu 22.04 for stability
- Includes ARM and AVR toolchains
- Pre-installed QMK CLI and dependencies
- Automatic symlink setup for your keymaps
- Optimized for your specific keyboard configurations
## Local Usage
### Building the Docker Image
```bash
docker build -t qmk-builder .
```
### Building Firmware
#### Using the build script:
```bash
# Build all keyboards
./build.sh
# Build specific keyboard
./build.sh iris
# Build with custom user
./build.sh iris myuser
```
#### Using Docker directly:
```bash
# Build all keyboards
docker run --rm \
-v "$(pwd):/workspace" \
-w /workspace \
-e USER=dgvigil \
qmk-builder \
bash -c "cd /qmk_firmware && qmk compile -kb keebio/iris/rev8 -km dgvigil"
```
## CI/CD Usage
The `.github/workflows/docker-build.yml` workflow demonstrates how to use this Docker setup in GitHub Actions:
1. Builds the Docker image
2. Builds each keyboard in parallel
3. Uploads firmware artifacts
4. Creates releases on main branch pushes
## Supported Keyboards
- `draculad``draculad`
- `iris``keebio/iris/rev8`
- `scottogame``handwired/scottokeebs/scottogame`
- `sweep``ferris/sweep`
- `swoop``bluebell/swoop`
## Environment Variables
- `USER` - The QMK user name (defaults to `dgvigil`)
- `QMK_HOME` - Path to QMK firmware (set to `/qmk_firmware`)
## Differences from qmkfm/qmk_cli
This custom Dockerfile provides:
1. **Faster builds** - Pre-installed toolchains and dependencies
2. **Better integration** - Automatic symlink setup for your keymaps
3. **Consistent environment** - Same setup across local and CI builds
4. **Optimized for your workflow** - Tailored to your specific keyboard configurations
## Troubleshooting
### Build fails with toolchain errors
Make sure the Docker image is built with the latest QMK firmware:
```bash
docker build --no-cache -t qmk-builder .
```
### Symlinks not working
The entrypoint script automatically sets up symlinks, but you can verify they exist:
```bash
docker run --rm -v "$(pwd):/workspace" qmk-builder ls -la /qmk_firmware/keyboards/keebio/iris/keymaps/
```
### Missing firmware files
Check that the build completed successfully and look for `.hex` and `.uf2` files in the QMK firmware directory.