Cleaned up the README file, adding some more documentation

pull/38/head
Bryan Klofas 2021-06-06 21:55:23 -07:00
rodzic c99eae08ad
commit f3b6d47ad9
1 zmienionych plików z 14 dodań i 10 usunięć

Wyświetl plik

@ -104,22 +104,26 @@ of rtl-ais.
Docker Container
----------------
Run rtl-ais in a docker container. No dependencies to install. Total container size is approximately 75 MB.
Now you can run rtl-ais in a docker container. No dependencies to install. Total container size is approximately 75 MB. Get/install docker [here](https://docs.docker.com/get-docker/).
Two options: Either download and run a pre-built docker container, or you can built the container locally.
Two options for obtaining the container: Either download and run a pre-built container, or build the container locally.
1. To test things out: `docker run -it --rm --device=/dev/bus/usb ghcr.io/bklofas/rtl-ais:latest`
* This image will run by default `./rtl_ais -n`, showing the received packets on STDOUT.
1. Just to test things out: `docker run -it --rm --device=/dev/bus/usb ghcr.io/bklofas/rtl-ais:latest`
* This downloads a pre-built container from the Github container registry.
* This image will run by default `./rtl_ais -n`, showing the received packets on STDOUT. All other default values.
* You can add other ./rtl-sdr options, see below.
* Make sure at least one RTL-SDR dongle is connected.
* Startup messages and decoded packets will display in the terminal. Ctrl-C to kill.
* Startup messages and decoded packets will display in the terminal.
* Ctrl-C to kill.
* Using the `--rm` flag will delete the container when you kill it. Otherwise, it will stay around until you prune.
1. For a more permanent setup, run the container in the background and add any options you want: `docker run -d --name rtl-ais --restart=unless-stopped --log-driver=local --network=host --device=/dev/bus/usb ghcr.io/bklofas/rtl-ais:latest ./rtl_ais -n -d 00000002 -h 127.0.0.1 -P 10110`
* -d: Start this container in daemon/background mode.
* --name: Name this anything you want.
* --restart: Automatically restart the container if something happens (reboot, USB problem), unless you have manually stopped the container (with `docker stop rtl-ais`).
* --log-driver: By default, docker uses the json log driver which will fill up your harddrive, depending on how busy your station is. local log driver defaults to 100MB of saved logs, and automatically rotates them.
* --network: Allows the container to talk to the internet, if you are sending the packets to an online service.
* --device: Allows the container to talk to the USB bus to access the RTL-SDR dongle.
* --restart=unless-stopped: Automatically restart the container if something happens (reboot, USB problem), unless you have manually stopped the container (with `docker stop rtl-ais`).
* --log-driver=local: By default, docker uses the json log driver which may fill up your harddrive, depending on how busy your station is. `local` log driver defaults to 100MB of saved logs, and automatically rotates them.
* --network=host: Allows the container to talk to the internet, if you are sending the packets to an online service.
* --device=: Allows the container to talk to the USB bus to access the RTL-SDR dongle.
* ./rtl_ais: Same command-line options as above.
* View the startup messages and decoded packets with `docker logs --follow rtl-ais`
@ -131,7 +135,7 @@ Building the container:
Other tips and tricks:
* If you have the `-n` flag, view the decoded AIS packets in real-time with `docker logs --follow rtl-ais`
* If you are only sending packets to one internet service (such as martinetraffic.com), you can use the `-h` and `-P` options that they provide.
* If you are only sending packets to one internet service (such as marinetraffic.com), you can use the `-h` and `-P` options that they send you.
Testing