Skip to content
Steven Honson edited this page Oct 14, 2019 · 67 revisions

Initial support for running radiosonde_auto_rx inside a Docker container is now available in the testing branch.

This is not available through Docker Hub at this time, and must instead be built locally.

When using a Raspberry Pi 1, Zero, or Zero W, a workaround is required to ensure the arm32v6 version of the alpine image is used:

[ "$(uname -m)" = "armv6l" ] && docker pull arm32v6/alpine:latest && docker tag arm32v6/alpine:latest alpine:latest

Build the container image

cd ~
git clone -b testing https://github.com/projecthorus/radiosonde_auto_rx.git
cd radiosonde_auto_rx
docker build --rm -t radiosonde_auto_rx .

Update the container image

cd ~/radiosonde_auto_rx/
git checkout testing
git pull
docker build --rm --no-cache -t radiosonde_auto_rx .

Substitute ~/radiosonde_auto_rx/ with the local path to the radiosonde_auto_rx Git repository.

After updating the container image, to use the new image, the existing container needs to be stopped and removed, and a new container run.

Run the container

docker run -d --name radiosonde_auto_rx --restart="unless-stopped" --device=/dev/bus/usb -v ~/radiosonde_auto_rx/auto_rx/station.cfg:/opt/auto_rx/station.cfg:ro -v ~/radiosonde_auto_rx/auto_rx/log:/opt/auto_rx/log -p 5000:5000 radiosonde_auto_rx

Alternatively, to launch the container directly in to an interactive shell rather than a daemonised auto_rx.py:

docker run --rm -it --name radiosonde_auto_rx --device=/dev/bus/usb -v ~/radiosonde_auto_rx/auto_rx/station.cfg:/opt/auto_rx/station.cfg:ro -v ~/radiosonde_auto_rx/auto_rx/log:/opt/auto_rx/log -p 5000:5000 radiosonde_auto_rx /bin/sh

Substitute ~/radiosonde_auto_rx/auto_rx/station.cfg and ~/radiosonde_auto_rx/auto_rx/log in the above commands with the relevant local paths, ensuring that station.cfg has been created as appropriate.

--restart="unless-stopped" 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.

Restart the container

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

docker restart radiosonde_auto_rx

Stop the container

docker stop radiosonde_auto_rx

Remove the container

docker rm radiosonde_auto_rx

View the containers logs

docker logs radiosonde_auto_rx
docker logs --tail 50 radiosonde_auto_rx
docker logs --follow radiosonde_auto_rx

Open a shell within an existing running container

docker exec -it radiosonde_auto_rx /bin/sh

Clone this wiki locally