|
ci/woodpecker/push/woodpecker Pipeline failed
Details
|
||
|---|---|---|
| docker/qmk | ||
| .woodpecker.yml | ||
| README.md | ||
| docker-compose.production.yml | ||
| docker-compose.staging.yml | ||
README.md
QMK Firmware Compiler
Compile your QMK firmware easily with Docker. This setup allows you to compile firmware from a directory of source files at runtime, ensuring flexibility for various keyboard and keymap compilations.
Docker Run
To compile your QMK firmware using the docker run command, set up your environment by specifying the source directory and output path:
-
Compile Firmware from a Single Source Directory:
docker run -v $(pwd)/data:/usr/src/app/data -v $(pwd)/bin:/usr/src/app/bin qmk-compilerThis command mounts your local
datadirectory containing the QMK source files to the container's/usr/src/app/datadirectory and outputs the compiled firmware to your localbindirectory.
Docker Compose
To integrate this process with Docker Compose, you can define a service in your docker-compose.yml file. This approach allows you to specify volume mounts and environment variables for a more automated and repeatable compilation process.
Example docker-compose.yml file for QMK firmware compilation:
version: '3'
services:
qmk-compiler:
image: qmk-compiler
volumes:
- ./data:/usr/src/app/data # Mount the source directory
- ./bin:/usr/src/app/bin # Mount the output directory
environment:
- KEYBOARD=example_keyboard # Specify the keyboard name (optional)
- KEYMAP=default # Specify the keymap name (optional)
Run the service defined in the docker-compose.yml file with:
docker-compose up
Customizing the Configuration
To customize your firmware compilation, you can adjust the following environment variables and volume mounts:
-
Volumes:
- Mount your source directory to
/usr/src/app/datato provide the firmware source files. - Mount your output directory to
/usr/src/app/binto retrieve the compiled firmware.
- Mount your source directory to
-
Environment Variables (Optional):
KEYBOARD: Specify the keyboard for which the firmware is being compiled. This variable can be used in yourcompile_firmware.shscript to dynamically select the keyboard.KEYMAP: Specify the keymap to be compiled. Similar toKEYBOARD, this can be used in the script to select the appropriate keymap.