Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ FROM common AS build

ARG ARCHITECTURE
ARG ZEPHYR_SDK_VERSION
ARG ZEPHYR_SDK_INSTALL_DIR=/opt/zephyr-sdk-${ZEPHYR_SDK_VERSION}
RUN \
export minimal_sdk_file_name="zephyr-sdk-${ZEPHYR_SDK_VERSION}_linux-$(uname -m)_minimal" \
&& if [ "${ARCHITECTURE}" = "arm" ]; then arch_format="eabi"; else arch_format="elf"; fi \
Expand All @@ -116,5 +115,7 @@ RUN \
#------------------------------------------------------------------------------

FROM dev-generic AS dev
ARG ZEPHYR_SDK_INSTALL_DIR=/opt/zephyr-sdk-${ZEPHYR_SDK_VERSION}

COPY --from=build ${ZEPHYR_SDK_INSTALL_DIR} ${ZEPHYR_SDK_INSTALL_DIR}

21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ Lightweight Docker images for [ZMK][zmk].
### Platforms

#### Tested

- `arm`

#### Not Tested

- `arc`
- `arm64`
- `mips`
Expand All @@ -23,6 +25,24 @@ Lightweight Docker images for [ZMK][zmk].

### Images

#### Build arguments

The building of the image requires the following build arguments:

- `ZEPHYR_VERSION`: version of [Zephyr][zephyr] to install (e.g. `4.1.0`)
- `ARCHITECTURE`: target architecture (e.g. `arm`, `x86_64`, etc.)
- `ZEPHYR_SDK_VERSION`: version of [Zephyr SDK][Zephyr SDK] to install (e.g. `0.17.4`)

Example:

```shell
docker build \
--build-arg ZEPHYR_VERSION=4.1.0 \
--build-arg ARCHITECTURE=x86_64 \
--build-arg ZEPHYR_SDK_VERSION=0.17.4 \
-t zmkfirmware/zmk-docker .
```

#### build

For _building_ [ZMK][zmk] firmware with CI.
Expand All @@ -47,3 +67,4 @@ For _developing_ [ZMK][zmk] (firmware and documentation).
[ubuntu]: https://hub.docker.com/_/ubuntu "Ubuntu"
[zephyr]: https://github.com/zephyrproject-rtos/zephyr "Zephyr"
[zmk]: https://github.com/zmkfirmware/zmk "ZMK"
[zephyr sdk]: https://github.com/zephyrproject-rtos/sdk-ng/tags "Zephyr SDK"