Overview

OpenThread Border Router (OTBR) provides Docker support, and can be run in a Docker container rather than directly on your local machine.

This guide focuses on running OTBR Docker on the Raspberry Pi 3B (RPi3B) or any Linux-based machine, and has only been tested on those platforms.

Raspberry Pi 3B setup

Install the Raspbian Stretch with Desktop OS on the RPi3B. Follow the instructions in the Download and Install the OS step from the Raspberry Pi 3B Overview, but make sure to use Raspbian Stretch with Desktop as the OS. You cannot use the Lite version, as you need to access the OTBR Web GUI in a web browser.

Once installed, boot up the RPi3B and open a terminal window.

  1. Update the system:
    sudo apt-get update
  2. Install Docker:
    curl -sSL https://get.docker.com | sh
  3. If you want to use Docker as non-root, without requiring sudo before each command, modify your user settings:
    sudo usermod -aG docker $USER
  4. Start Docker if it is not already running:
    sudo dockerd
  5. Install git:
    sudo apt install git

Linux setup

Use the same instructions as the RPi3B:

  1. Update the system:
    sudo apt-get update
  2. Install Docker:
    curl -sSL https://get.docker.com | sh
  3. If you want to use Docker as non-root, without requiring sudo before each command, modify your user settings:
    sudo usermod -aG docker $USER
  4. Start Docker if it is not already running:
    sudo dockerd
  5. Install git:
    sudo apt install git

Mac or Windows

To use OTBR Docker on Mac or Windows, install Docker Toolbox. This is required as running OTBR Docker involves mounting virtual serial ports, which is only supported by Docker Toolbox on those systems.

Get the OTBR Docker image

Get the OTBR Docker image by pulling it directly from the OpenThread Docker Hub, or by cloning the OTBR repository and building the included Dockerfile locally.

We recommend pulling the image from Docker Hub, as it has been tested and verified by the OpenThread team.

Pull the image from Docker Hub

This image is as of Commit ID e80def4.

  1. Pull the image:
    docker pull openthread/otbr:latest
  2. It should now appear in your list of Docker images:
    docker images
    REPOSITORY           TAG          IMAGE ID           CREATED           SIZE
    openthread/otbr      latest       98416559dcbd       2 weeks ago       1.15GB

Build the Dockerfile

To create the image yourself, clone the OpenThread Border Router repository and build the included Dockerfile.

  1. Clone the OTBR repository:
    cd ~
    git clone https://github.com/openthread/borderrouter
    cd borderrouter
    
  2. If the OTBR repository already existed on your system, clean the repo:
    make distclean
  3. Build the Dockerfile:
    docker build --no-cache -t openthread/otbr -f etc/Dockerfile .