wasm-micro-runtime/product-mini/platforms/zephyr/simple/Dockerfile
Stefan Wallentowitz 936206f97b
Update Zephyr document, add esp32c3 and particle_argon support(#920)
Update the Zephyr document to provide more detailed instructions, and add info
about espressif toolchain too.

Add ESP32C3 (RISC-V) and Particle Argon boards support to the zephyr platform
sample. More boards are possible, but the script doesn't scale well and is to be
improved in future.

Add Dockerfile to kickstart a Zephyr development environment as it can be rather
confusing for new users.
2021-12-29 10:05:27 +08:00

35 lines
990 B
Docker

FROM ubuntu:20.04
ARG DOCKER_UID=1000
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -qq update && apt-get -qq dist-upgrade && apt install -qq -y python3-pip git wget ninja-build
WORKDIR /tmp
RUN mkdir /opt/cmake && wget -q https://github.com/Kitware/CMake/releases/download/v3.22.1/cmake-3.22.1-linux-x86_64.sh && sh cmake-3.22.1-linux-x86_64.sh --skip-license --prefix=/opt/cmake && rm cmake-3.22.1-linux-x86_64.sh
ENV PATH="/opt/cmake/bin:$PATH"
RUN useradd -m wamr -u ${DOCKER_UID} -G dialout
USER wamr
ENV PATH="/home/wamr/.local/bin:$PATH"
RUN pip3 install --user west
RUN west init ~/zephyrproject && cd ~/zephyrproject && west update && west zephyr-export
RUN pip3 install --user -r ~/zephyrproject/zephyr/scripts/requirements.txt
WORKDIR /home/wamr/zephyrproject
RUN west espressif install
ENV ZEPHYR_BASE=/home/wamr/zephyrproject/zephyr
ENV ESPRESSIF_TOOLCHAIN_PATH=/home/wamr/.espressif/tools/zephyr
WORKDIR /home/wamr/source/product-mini/platforms/zephyr/simple