mirror of
https://github.com/espressif/openthread.git
synced 2026-09-12 04:00:10 +00:00
[docs] added new Dockerfiles (#3347)
This commit is contained in:
committed by
Jonathan Hui
parent
cc7cf137d6
commit
b61be18e37
+12
-5
@@ -1,13 +1,13 @@
|
||||
|
||||
## Running wpantund from a Docker container:
|
||||
|
||||
For a device that has a Thread radio attached to port /dev/ttyUSB0, start wpantund as follows:
|
||||
For a device that has a Thread radio attached to port `/dev/ttyUSB0`, start `wpantund` as follows:
|
||||
|
||||
```
|
||||
docker run --rm --detach -e "OPENTHREAD_DEVICE_PORT=/dev/ttyUSB0" --cap-add=NET_ADMIN --device=/dev/ttyUSB0 --name=wpantund openthread/wpantund
|
||||
```
|
||||
|
||||
Once wpantund is running, one can control the Thread interface with wpanctl as follows:
|
||||
Once `wpantund` is running, one can control the Thread interface with `wpanctl` as follows:
|
||||
|
||||
```
|
||||
docker exec -it wpantund wpanctl
|
||||
@@ -17,11 +17,18 @@ docker exec -it wpantund wpanctl
|
||||
## Content
|
||||
|
||||
arm32v7_ubuntu_wpantund
|
||||
- wpantund running on ARMv7 (e.g. Raspberry Pi)
|
||||
- `wpantund` running on ARMv7 (e.g. Raspberry Pi)
|
||||
|
||||
x86_ubuntu_wpantund
|
||||
- wpantund running on x86
|
||||
- `wpantund` running on x86
|
||||
|
||||
ot_sim
|
||||
- OpenThread Posix simulator
|
||||
- OpenThread POSIX simulator
|
||||
|
||||
codelab_otsim
|
||||
- For use with the [Docker Simulation Codelab](https://codelabs.developers.google.com/codelabs/openthread-simulation/), contains the OpenThread POSIX example and `wpantund` pre-built and ready to use.
|
||||
|
||||
environment
|
||||
- Development environment with the GNU toolchain and all required OpenThread dependencies installed. OpenThread is not built in this image.
|
||||
|
||||
Images built from these Dockerfiles are available to pull from [Docker Hub](https://hub.docker.com/u/openthread/). See [Docker Support on openthread.io](https://openthread.io/guides#docker_support) for more information.
|
||||
@@ -0,0 +1,39 @@
|
||||
# Ubuntu image with tools required to build OpenThread
|
||||
FROM ubuntu:18.04
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# Install dependencies:
|
||||
RUN apt-get update -qq
|
||||
|
||||
# Install packages needed for wpantund build and runtime:
|
||||
RUN apt-get install -y build-essential git make autoconf \
|
||||
autoconf-archive automake dbus libtool gcc \
|
||||
g++ gperf flex bison texinfo ncurses-dev \
|
||||
libexpat-dev python sed python-pip gawk \
|
||||
libreadline6-dev libdbus-1-dev \
|
||||
libboost-dev inetutils-ping
|
||||
|
||||
RUN apt-get install -y --force-yes gcc-arm-none-eabi
|
||||
RUN pip install pexpect
|
||||
|
||||
# Install wpantund:
|
||||
RUN mkdir -p ~/src && \
|
||||
cd ~/src && \
|
||||
git clone --recursive https://github.com/openthread/wpantund.git && \
|
||||
cd wpantund && \
|
||||
git checkout full/master && \
|
||||
./configure --sysconfdir=/etc && \
|
||||
make && make install
|
||||
|
||||
RUN mkdir -p /dev/net && mknod /dev/net/tun c 10 200 && chmod 600 /dev/net/tun
|
||||
|
||||
# Restart dbus
|
||||
RUN service dbus restart
|
||||
|
||||
# Install OpenThread
|
||||
RUN cd ~/src && \
|
||||
git clone --recursive https://github.com/openthread/openthread.git && \
|
||||
cd openthread && \
|
||||
./bootstrap && \
|
||||
make -f examples/Makefile-posix
|
||||
@@ -0,0 +1,19 @@
|
||||
# Ubuntu image with tools required to build OpenThread
|
||||
FROM ubuntu:18.04
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# Install dependencies:
|
||||
RUN apt-get update -qq
|
||||
|
||||
# Install packages needed for wpantund build and runtime:
|
||||
RUN apt-get install -y build-essential git make autoconf \
|
||||
autoconf-archive automake dbus libtool gcc \
|
||||
g++ gperf flex bison texinfo ncurses-dev \
|
||||
libexpat-dev python sed python-pip gawk \
|
||||
libreadline6-dev libdbus-1-dev \
|
||||
libboost-dev inetutils-ping
|
||||
|
||||
RUN apt-get install -y --force-yes gcc-arm-none-eabi
|
||||
RUN pip install pexpect
|
||||
|
||||
Reference in New Issue
Block a user