Dockerfile 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Copyright (C) 2019 Intel Corporation. All rights reserved.
  2. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  3. # Refer to https://docs.zephyrproject.org/3.7.0/develop/getting_started/index.html
  4. # for more information on how to set up the Zephyr development environment.
  5. # https://docs.zephyrproject.org/latest/develop/application/index.html#zephyr-workspace-application
  6. # zephyrproject/ --> CI ROOT
  7. # ├─── .west/
  8. # │ └─── config
  9. # ├─── bootloader/
  10. # ├─── zephyr/ --> Zephyr source code
  11. # ├─── zephyr-sdk/
  12. # ├─── modules/
  13. # │ |─── wasm-micro-runtime --> WAMR source code
  14. # ├─── tools/
  15. # ├─── vendor/
  16. # └─── application/ --> DUMMY. keep west_lite.yml here
  17. # If you modify this file, you may need to sync the modifications to the
  18. # .github/actions/setup-zephyr/action.yml
  19. FROM ghcr.io/zephyrproject-rtos/ci-base:v0.26-branch
  20. ARG DEBIAN_FRONTEND=noninteractive
  21. ENV TZ=Asian/Shanghai
  22. ARG ZEPHYR_SDK_VERSION=0.16.9
  23. # In west_lite.yml, the Zephyr version is set to v3.7.0
  24. #ARG ZEPHYR_VERSION=3.7.0
  25. # Install the Zephyr Software Development Kit (SDK) minimal version
  26. WORKDIR /root/zephyrproject/zephyr-sdk
  27. # hadolint ignore=DL4006
  28. RUN wget --progress=dot:giga https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${ZEPHYR_SDK_VERSION}/zephyr-sdk-${ZEPHYR_SDK_VERSION}_linux-x86_64_minimal.tar.xz \
  29. && wget --progress=dot:giga -O - https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v${ZEPHYR_SDK_VERSION}/sha256.sum | shasum --check --ignore-missing \
  30. && tar --strip-components=1 -xf zephyr-sdk-${ZEPHYR_SDK_VERSION}_linux-x86_64_minimal.tar.xz && rm zephyr-sdk-${ZEPHYR_SDK_VERSION}_linux-x86_64_minimal.tar.xz
  31. # hadolint ignore=DL4006
  32. # Install arc tools, host tools and Register Zephyr SDK CMake package
  33. # If you want to use other toolchains, please change the -t option
  34. RUN ./setup.sh -t arc-zephyr-elf -h -c
  35. # Install west
  36. # hadolint ignore=DL3013,DL3059
  37. RUN pip3 install --no-cache-dir west
  38. # Setup a T2(Star topology) workspace
  39. WORKDIR /root/zephyrproject/application
  40. COPY ./west_lite.yml ./west_lite.yml
  41. # init the west workspace with a minimal manifest
  42. RUN west init -l --mf west_lite.yml .
  43. WORKDIR /root/zephyrproject
  44. RUN west update --stats
  45. # Git clone wamr
  46. WORKDIR /root/zephyrproject/modules/
  47. RUN git clone https://github.com/bytecodealliance/wasm-micro-runtime.git wasm-micro-runtime
  48. WORKDIR /root/zephyrproject/modules/wasm-micro-runtime/product-mini/platforms/zephyr