Dockerfile to generate a container with everything needed to use QMK(Quantum Mechanical Keyboard).
The size of the extracted image is approximately 4.6GB.
docker pull jsanchez0x/qmk_container
git clone https://github.com/jsanchez0x/qmk_container.git
docker build --rm --tag jsanchez0x/qmk_container:latest qmk_container
It is necessary to create some working directories. For example:
mkdir -p $HOME/qmk/firmwares $HOME/qmk/keyboards
You need to have the source code files. You can get them from the official QMK repository (keyboards directory) and copy it into the $HOME/qmk/keyboards directory.
Example for the YMDK Wings PCB:
git clone https://github.com/qmk/qmk_firmware.git
cp -r qmk_firmware/keyboards/ymdk $HOME/qmk/keyboards/
Run the qmk_compile command for execute the compilation in the container. It is recommended to share a directory in order to have the project on the host machine and the compiled firmware is also generated on the host machine.
Following the previous example:
docker run --rm -it \
--name qmk_container \
-v $HOME/qmk/keyboards/:/qmk_firmware/keyboards/ \
-v $HOME/qmk/firmwares/:/qmk_firmware/.build/ \
jsanchez0x/qmk_container:latest qmk_compile
The keyboard and keymap will be requested. Continuing with the example:
Keyboard (i.e. kbdfans/kbd67/mkiirgb/v2):
ymdk/wings
Keymap (i.e. via):
defaultExecuting compilation...
More information on how to use this image can be found in the official QMK documentation.
Official QMK base container