Dockerfile 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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)
  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.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.tar.xz && rm zephyr-sdk-${ZEPHYR_SDK_VERSION}_linux-x86_64.tar.xz
  31. # hadolint ignore=DL4006
  32. # Install host tools and Register Zephyr SDK CMake package
  33. RUN ./setup.sh -h -c
  34. # Install west
  35. # hadolint ignore=DL3013,DL3059
  36. RUN pip3 install --no-cache-dir west
  37. # Setup a T2(Star topology) workspace
  38. WORKDIR /root/zephyrproject/application
  39. COPY ./west_lite.yml ./west_lite.yml
  40. # init the west workspace with a minimal manifest
  41. RUN west init -l --mf west_lite.yml .
  42. WORKDIR /root/zephyrproject
  43. RUN west update --stats
  44. # Git clone wamr
  45. WORKDIR /root/zephyrproject/modules/
  46. RUN git clone https://github.com/bytecodealliance/wasm-micro-runtime.git wasm-micro-runtime
  47. WORKDIR /root/zephyrproject/modules/wasm-micro-runtime/product-mini/platforms/zephyr