main
 1# syntax=docker/dockerfile:1.17.0
 2FROM zmkfirmware/zmk-build-arm:stable AS builder
 3
 4COPY ./config/west.yml /workspace/zmk-config/config/
 5WORKDIR /workspace/zmk-config/
 6
 7RUN west init -l config
 8RUN west update
 9RUN west zephyr-export
10
11COPY ./config/* /workspace/zmk-config/config/
12COPY ./config/boards /workspace/zmk-config/config/boards
13
14FROM builder AS builder_left
15RUN west build -s zmk/app \
16    -b nice_nano_v2 -d /tmp/left -- \
17    -DZMK_CONFIG=/workspace/zmk-config/config \
18    -DSHIELD="keyball44_left"
19
20FROM builder AS builder_right
21RUN west build -s zmk/app \
22    -b nice_nano_v2 -d /tmp/right -- \
23    -DZMK_CONFIG=/workspace/zmk-config/config \
24    -DSHIELD="keyball44_right"
25
26FROM scratch AS output_collector
27COPY --from=builder_right /tmp/right/zephyr/zmk.uf2 keyball44_right.uf2
28COPY --from=builder_left /tmp/left/zephyr/zmk.uf2 keyball44_left.uf2