Skip to content
Steven Honson edited this page Mar 8, 2021 · 67 revisions

Note: radiosonde_auto_rx is not available as pre-built images at this time, and must instead be built locally. Prebuilt images will be available soon through GitHub Container Registry.

Installation

Prerequisites

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 rmmod dvb_usb_rtl28xxu

If the rmmod command errors, a reboot may will alternatively unload the driver.

Building and updating the container image

docker pull python:3.7-buster
docker pull python:3.7-slim-buster
docker build --rm --no-cache -t radiosonde_auto_rx https://github.com/projecthorus/radiosonde_auto_rx.git#testing

After updating the container image, to use the new image, any existing radiosonde_auto_rx containers need to be stopped and removed, and a new container run.

Running the container

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 radiosonde_auto_rx

Substitute ~/radiosonde_auto_rx/station.cfg and ~/radiosonde_auto_rx/log in the above command with the relevant local paths, ensuring that station.cfg has been created as per Configuration-Settings

--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.

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:
    build: https://github.com/projecthorus/radiosonde_auto_rx.git#testing
    container_name: radiosonde_auto_rx
    devices:
      - /dev/bus/usb
    ports:
      - 5000:5000
    restart: always
    volumes:
      - ./station.cfg:/opt/auto_rx/station.cfg:ro
      - radiosonde_auto_rx_logs:/opt/auto_rx/log

volumes:
  radiosonde_auto_rx_logs:

Other useful commands

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

Clone this wiki locally