1# Ubuntu image with tools required to build OpenThread 2FROM ubuntu:22.04 3 4ENV DEBIAN_FRONTEND noninteractive 5ENV LANG en_US.UTF-8 6 7RUN set -x \ 8 && apt-get update -y \ 9 && apt-get install -y locales \ 10 && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \ 11 && apt-get --no-install-recommends install -fy \ 12 bzip2 \ 13 git \ 14 ninja-build \ 15 python3 \ 16 python3-pip \ 17 python3-setuptools \ 18 software-properties-common \ 19 sudo \ 20 netbase \ 21 inetutils-ping \ 22 ca-certificates \ 23 && update-ca-certificates \ 24 && python3 -m pip install -U pip \ 25 && python3 -m pip install -U cmake \ 26 && python3 -m pip install wheel 27 28# set up openthread simulation cli example apps 29WORKDIR / 30COPY . openthread 31RUN set -x \ 32 && cd openthread \ 33 && ./script/bootstrap \ 34 && mkdir build \ 35 && cd build \ 36 && cmake -GNinja -DOT_COMMISSIONER=ON -DOT_JOINER=ON -DOT_PLATFORM=simulation .. \ 37 && ninja 38 39# set up ot-daemon 40WORKDIR / 41RUN set -x \ 42 && cd openthread \ 43 && ./script/cmake-build posix -DOT_DAEMON=ON 44