This is purely a container that should be usable for a CI to compile a QMK firmware.
Go to file
colin 1f6ca51857
ci/woodpecker/push/woodpecker Pipeline failed Details
Update README.md
2024-02-29 01:56:16 +00:00
docker/qmk Add docker/qmk/compile_firmware.sh 2024-02-29 00:29:34 +00:00
.woodpecker.yml Update .woodpecker.yml 2024-02-22 13:57:02 +00:00
README.md Update README.md 2024-02-29 01:56:16 +00:00
docker-compose.production.yml Update docker-compose.production.yml 2024-02-29 00:34:55 +00:00
docker-compose.staging.yml Update docker-compose.staging.yml 2024-02-29 00:34:36 +00:00

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:

  1. Compile Firmware from a Single Source Directory:

    docker run -v $(pwd)/data:/usr/src/app/data -v $(pwd)/bin:/usr/src/app/bin qmk-compiler
    

    This command mounts your local data directory containing the QMK source files to the container's /usr/src/app/data directory and outputs the compiled firmware to your local bin directory.

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/data to provide the firmware source files.
    • Mount your output directory to /usr/src/app/bin to retrieve the compiled firmware.
  • Environment Variables (Optional):

    • KEYBOARD: Specify the keyboard for which the firmware is being compiled. This variable can be used in your compile_firmware.sh script to dynamically select the keyboard.
    • KEYMAP: Specify the keymap to be compiled. Similar to KEYBOARD, this can be used in the script to select the appropriate keymap.