I’ve contributed to a Docker image for a The Things Network (TTN) gateway recently. Pure joy! It helps to have your own TTN LoRaWAN gateway up in no time – once you’ve assembled the hardware that is.
I will blog at a later point about how to build your own gateway for The Things Network and what I learned along the way. This here is purely about the software side of the fence.
For a long time there was no official Docker support for ARM systems like e.g. the Raspberry Pi. That changed with Docker 1.12.1 in August 2016. So, you can install Docker on the Raspbian Jessie OS (based on Debian). However, that’s a lot of manual work that you’d likely want to avoid if possible. Enter, Hypriot.
A group of five Germans started porting Docker to ARM in early 2015. They did so by creating a new Debian-based OS: HypriotOS.
…an operating system that is optimized to run Docker. It made it dead easy use Docker on any Raspberry Pi by just downloading and flashing a prepared SD card image with HypriotOS. From start to finish it takes a user less than 5 minutes to get started with Docker on Raspberry Pi.
So, rather than following a tutorial and working directly on the Pi you prepare an SD card on some host system, then insert the SD card into the Pi, boot up and you’re done. Sweet.
That gives you the basis to work with Docker containers on a Raspberry Pi. Our TTN gateway Docker image then removes the burden of configuring the Raspberry Pi for The Things Network. It’s as easy as supplying a number of environment variables that uniquely identify your gateway to the Docker container.
The last step of course is to register your gateway on the TTN website.