Skip to content
Mark Jessop edited this page Apr 9, 2021 · 66 revisions

Container Images

A pre-built Docker image is available at https://github.com/orgs/projecthorus/packages/container/package/radiosonde_auto_rx. To install this, follow the instructions below.

Installation

Docker

It is highly recommended that you use the latest version of Docker, rather than the one available from your systems default package repositories.

A quick way to install the latest version of Docker is by using the convenience script:

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

To be able to run docker commands as your non-root user (recommended), run:

sudo usermod -aG docker $(whoami)

You will need to logout and log back in afterwards to pick up the changes to group membership.

RTL-SDR Kernel Blacklisting

The RTL DVB kernel modules must first be blacklisted on the Docker host. RTL-SDR itself is not required on the Docker host. This can be accomplished using the following commands:

echo 'blacklist dvb_usb_rtl28xxu' | sudo tee /etc/modprobe.d/blacklist-dvb_usb_rtl28xxu.conf
sudo modprobe -r dvb_usb_rtl28xxu

If the modprobe -r command errors, a reboot may be required to unload the module.

Configuring radiosonde_auto_rx and creating a log directory

station.cfg should be configured as per Configuration-Settings. An example station.cfg can be found here.

Also ensure that an empty directory named log is available if you wish to retain log files.

A quick way to create these files, assuming you want to store them in your home directory, is:

mkdir -p ~/radiosonde_auto_rx/log
curl -o ~/radiosonde_auto_rx/station.cfg https://raw.githubusercontent.com/projecthorus/radiosonde_auto_rx/master/auto_rx/station.cfg.example

Making sure to edit ~/radiosonde_auto_rx/station.cfg to your requirements.

Running the container

docker run \
  -d \
  --name radiosonde_auto_rx \
  --restart="always" \
  --device=/dev/bus/usb \
  --network=host \
  -v ~/radiosonde_auto_rx/station.cfg:/opt/auto_rx/station.cfg:ro \
  -v ~/radiosonde_auto_rx/log/:/opt/auto_rx/log/ \
  ghcr.io/projecthorus/radiosonde_auto_rx:latest

Substitute ~/radiosonde_auto_rx/station.cfg and ~/radiosonde_auto_rx/log/ in the above command with the relevant local paths on your Docker host if not storing these in your home directory as per the above examples.

--restart="always" will result in the container automatically restarting after a failure or host system reboot.

Once running, you can access the Web UI through http://<docker-host>:5000.

Other useful commands

Pulling the latest version of the container

docker pull ghcr.io/projecthorus/radiosonde_auto_rx:latest

You must then remove and recreate the container to use the newly pulled version, for example:

docker pull ghcr.io/projecthorus/radiosonde_auto_rx:latest
docker stop radiosonde_auto_rx
docker rm radiosonde_auto_rx
docker run -d --name radiosonde_auto_rx --restart="always" --device=/dev/bus/usb -v ~/radiosonde_auto_rx/station.cfg:/opt/auto_rx/station.cfg:ro -v ~/radiosonde_auto_rx/log/:/opt/auto_rx/log/ -p 5000:5000 ghcr.io/projecthorus/radiosonde_auto_rx:latest

Restarting the container

Restarting the container is useful for picking up changes to station.cfg.

docker restart radiosonde_auto_rx

Stoping the container

docker stop radiosonde_auto_rx

Removing the container

docker rm radiosonde_auto_rx

Viewing the containers logs

All logs

docker logs radiosonde_auto_rx

Last 50 lines

docker logs --tail 50 radiosonde_auto_rx

Following the logs in real-time

docker logs --tail 50 --follow radiosonde_auto_rx

Opening a shell within an existing running container

docker exec -it radiosonde_auto_rx /bin/bash

Docker Compose

If you wish to use Docker Compose instead of the docker CLI, the following basic docker-compose.yml can be used as a starting point:

services:
  radiosonde_auto_rx:
    container_name: radiosonde_auto_rx
    devices:
      - /dev/bus/usb
    image: ghcr.io/projecthorus/radiosonde_auto_rx:latest
    network: host
    restart: always
    volumes:
      - ./station.cfg:/opt/auto_rx/station.cfg:ro
      - radiosonde_auto_rx_logs:/opt/auto_rx/log

volumes:
  radiosonde_auto_rx_logs:

station.cfg should be configured as per Configuration-Settings. An example station.cfg can be found here. The above path (./station.cfg) should be updated to reflect the location of station.cfg on your Docker host.

For help getting started with Docker Compose, @mikenye's ADS-B Reception, Decoding & Sharing with Docker guide is a great resource.