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
 7# Set up the west workspace
 8# Initialize west, pointing to the copied zmk-config as the manifest path.
 9# This assumes zmk-config contains a west.yml that pulls in the main ZMK repo.
10RUN west init -l config
11RUN west update
12RUN west zephyr-export
13
14COPY ./config/* /workspace/zmk-config/config/
15COPY . /workspace/zmk-new_corne
16
17FROM builder AS builder_left
18# Build the firmware for Corne Left
19# The --build-dir ensures output is isolated for this specific build.
20# We explicitly go into zmk-config to run the build command relative to it.
21RUN west build -s zmk/app \
22    -b eyelash_corne_left -d /tmp/left -- \
23    -DZMK_CONFIG=/workspace/zmk-config/config \
24    -DSHIELD="nice_view_gem" \
25    -DZMK_EXTRA_MODULES=/workspace/zmk-new_corne
26
27FROM builder AS builder_right
28# Build the firmware for Corne Right
29# Same as above, ensuring isolated output.
30RUN west build -s zmk/app \
31    -b eyelash_corne_right -d /tmp/right -- \
32    -DZMK_CONFIG=/workspace/zmk-config/config \
33    -DSHIELD="nice_view_gem" \
34    -DZMK_EXTRA_MODULES=/workspace/zmk-new_corne
35
36FROM scratch AS output_collector
37# No actual operations here, as 'docker buildx build --output' handles the extraction.
38# This stage just serves as a clear endpoint if you were to define explicit COPY --from.
39COPY --from=builder_right /tmp/right/zephyr/zmk.uf2 eyelash_corne_right.uf2
40COPY --from=builder_left /tmp/left/zephyr/zmk.uf2 eyelash_corne_left.uf2