zmk-config/Dockerfile

30 lines
1.1 KiB
Docker

from ubuntu:22.04
run apt update
run apt upgrade -y
run DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends git cmake ninja-build gperf ccache dfu-util device-tree-compiler wget python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file make gcc gcc-multilib g++-multilib libsdl2-dev libmagic1
run wget -O - https://apt.kitware.com/kitware-archive.sh | bash
run pip3 install -U west
run groupadd -g 1000 builder
run useradd -m -u 1000 -g 1000 -s /bin/bash builder
user builder
workdir /home/builder
run git clone https://github.com/zmkfirmware/zmk.git
workdir /home/builder/zmk
run west init -l app/
run west update
user root
run pip3 install -r /home/builder/zmk/zephyr/scripts/requirements.txt
workdir /usr/local
run wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.16.3/zephyr-sdk-0.16.3_linux-x86_64.tar.xz
run tar xvf zephyr-sdk-0.16.3_linux-x86_64.tar.xz
run rm zephyr-sdk-0.16.3_linux-x86_64.tar.xz
workdir /usr/local/zephyr-sdk-0.16.3
run ./setup.sh -t all -h
user builder
run ./setup.sh -t all -c
workdir /home/builder/zmk/app