-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.keychron
More file actions
44 lines (33 loc) · 1.59 KB
/
Copy pathDockerfile.keychron
File metadata and controls
44 lines (33 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Keychron QMK Firmware build environment
# Uses Keychron's wireless_playground branch for Bluetooth/2.4GHz support
FROM swift:6.3.3-noble AS swift-toolchain
RUN cp -L /usr/lib/*/libncurses.so.6 /tmp/libncurses.so.6
FROM ghcr.io/qmk/qmk_cli
COPY --from=swift-toolchain /usr/bin/swift-driver /usr/bin/swift-driver
COPY --from=swift-toolchain /usr/bin/swift-frontend /usr/bin/swift-frontend
COPY --from=swift-toolchain /usr/bin/clang-21 /usr/bin/clang-21
COPY --from=swift-toolchain /usr/lib/swift /usr/lib/swift
COPY --from=swift-toolchain /usr/lib/clang/21 /usr/lib/clang/21
COPY --from=swift-toolchain /tmp/libncurses.so.6 /usr/local/lib/libncurses.so.6
RUN ldconfig \
&& ln -s swift-driver /usr/bin/swift \
&& ln -s swift-driver /usr/bin/swiftc \
&& ln -s clang-21 /usr/bin/clang \
&& ln -s swift-frontend /usr/bin/swift-autolink-extract \
&& swift --version
# Clone Keychron's fork with wireless support (shallow clone to save space)
RUN git clone --depth 1 -b wireless_playground \
https://github.com/Keychron/qmk_firmware.git /qmk_firmware
# Add the missing keymap-level Raw HID extension point without replacing
# Keychron's proprietary commands.
COPY patches/keychron-raw-hid-user-hook.patch /tmp/keychron-raw-hid-user-hook.patch
RUN git -C /qmk_firmware apply /tmp/keychron-raw-hid-user-hook.patch
# Initialize submodules needed for the build
WORKDIR /qmk_firmware
# Install Keychron's specific Python requirements
RUN pip install -r requirements.txt
# Initialize git submodules
RUN qmk git-submodule
# Set up for userspace overlay
ENV QMK_USERSPACE=/qmk_userspace
WORKDIR /qmk_firmware