Docker piaware - for rapid setup on Windows/OSX/Linux/RPI

As previous discussed in thread ads-b-flight-tracking-f21/raspberry-pi-docker-from-blank-sd-to-feeding-in-15-mins-t36459.html I was aiming to get some a blank Raspberry Pi to fully functional dump1090 + piaware + flightradar24 + planefinder in under 15 minutes.

For Raspberry Pi - refer to my previous thread instead: ads-b-flight-tracking-f21/raspberry-pi-docker-from-blank-sd-to-feeding-in-15-mins-t36459.html

In the end, I think I’ve managed to get all 4 running in around 5 minutes. And moreover, because all the configuration is done in the Dockerfiles behind the scenes, even non geeks can get their Raspberry Pi’s up and running without pain.

Someone asked me if it’s possible to do the same thing on Windows (or even OS X or Linux).
Sure…

I’ve managed to get it running on OS X using Docker, which basically automatically solves the install for Windows and Linux as well.

Steps

  1. Install Docker for your specific OS - docs.docker.com/ - the click “Get Started”
  2. (Windows or OS X) run “Docker Quickstart Terminal” application then issue:


$ docker-machine stop default

  1. (Windows or OS X) Open VirtualBox, and ensure the dongle is shared:
    https://s3.amazonaws.com/uploads.hipchat.com/10804/836483/8GzQuodYABCPw9O/Screen%20Shot%202015-12-30%20at%202.18.39%20PM.png
  2. (Windows or OS X) in the “Docker Quickstart Terminal” window run:


$ docker-machine start default

  1. Create a file in a directory of your choice called docker-compose.yml with the following contents:

dump1090-piaware:
  restart: always
  image: "inodes/docker-x86-rtlsdr-dump1090-piaware"
  command: "/scripts/start-dump1090-piaware.sh"
  environment:
   - USERNAME=XXXXX
   - PASSWORD=XXXXX
   - LAT=30.1234
   - LONG=100.1234
   - PPM=1
  mac_address: xx:xx:xx:xx:xx:xx
  expose:
    - "30003"
    - "30004"
    - "30005"
  devices:
    - "/dev/bus/usb"
  ports:
   - "8080:8080"

  1. and make edits to make it your own changing:
    a) Latitude and Longitude (e.g. Sydney, Australia -33.7968 150.7823 - see where-am-i.net)
    b) PPM (optional - leave as 1 - more on this later)
    c) Username and Password (for Flightaware)
    d) MAC Address of container (this can be anything your would like, or an old MAC address or even generated hellion.org.uk/cgi-bin/randmac.pl) - unique required per piaware client
  2. Run the container the first time using, then press + C to stop:

$ docker-compose up
.... some docker pulls and installs
Starting dockerx86rtlsdrdump1090piaware_dump1090-piaware_1
Attaching to dockerx86rtlsdrdump1090piaware_dump1090-piaware_1
dump1090-piaware_1 | Adding user myusername and password mypassword to Flightaware configuration
dump1090-piaware_1 | Wed Dec 30 03:27:26 2015 UTC  dump1090-mutability v1.14-137-g59726c6 starting up.
dump1090-piaware_1 | Using sample converter: UC8, integer/table path
dump1090-piaware_1 | Found 1 device(s):
dump1090-piaware_1 | 2.1-5
dump1090-piaware_1 | 0: Realtek, RTL2841UHIDIR, SN: 00000001 (currently selected)
dump1090-piaware_1 | Found Rafael Micro R820T tuner
dump1090-piaware_1 | Using automatic gain control.
dump1090-piaware_1 | Gain reported by device: 0.00 dB
Gracefully stopping... (press Ctrl+C again to force)
Stopping dockerx86rtlsdrdump1090piaware_dump1090-piaware_1 ...
Killing dockerx86rtlsdrdump1090piaware_dump1090-piaware_1 ... done

  1. Start it properly

$ docker-compose start
Starting dockerx86rtlsdrdump1090piaware_dump1090-piaware_1

Voila… you’re done.
The stats should now be visible on your stats page

Also connecting to ](http://)<IP_OF_CONTAINER>:8080 should show the webpage

How well does virtualbox’s USB passthrough work? I’d had reports that vmware, at least, tends to drop lots of data from the dongle (makes mlat useless)

I’ll run it shortly in a side by side comparison to see what the impact is. I’ve only been running it for a short while today to test, and to be honest the only reason I got Docker running for OS X/Windows (which would require the passthrough) is because (a) it’s reasonably easy to convert from RPI and (b) because someone asked me to.

Thank you for putting this together! I just got a NooElec SDR USB dongle from Amazon and was able to get this docker image up and running in no time on my Mac.

I tried going down the route of getting dump1090 and the other utilities configured on my Mac natively to start sending to Flightaware that way but it was proving to be a difficult process as it’s clearly designed for Linux.

I imagine this was done as a one off but would you consider keeping this image up to date? I plan to continue to use it on my Mac and I could see others doing the same.

I am new to Docker so I apologize in advance. Here is a set of errors I get when launching the process :

ERROR: yaml.scanner.ScannerError: while scanning a simple key
in “./docker-compose.yml”, line 6, column 1
could not found expected ‘:’
in “./docker-compose.yml”, line 7, column 1

Any insights or suggestions are welcome.

Which command is producing this error? Would you be willing to post your yaml file (removing anything sensitive like a mac address or password)?

I’ll have to give this a go next week! I ordered the Pro Stick and that’ll go on my Pi setup. I’ll have a leftover USB SDR so I’ll leave it running on the computer at work. (OS X)

I basically started off with the sample file that was posted earlier in this thread. So the syntax error kicks in with any of the parameters after the environment statement e.g. USERNAME, PASSWORD, LAT, LONG. This is on OS X for me.

*dump1090-piaware:
restart: always
image: “inodes/docker-x86-rtlsdr-dump1090-piaware”
command: “/scripts/start-dump1090-piaware.sh”
environment:

  • USERNAME=XXXXX
  • PASSWORD=XXXXX
  • LAT=30.1234
  • LONG=100.1234
  • PPM=1
    mac_address: xx:xx:xx:xx:xx:xx
    expose:
    - “30003”
    - “30004”
    - “30005”
    devices:
    - “/dev/bus/usb”
    ports:
  • “8080:8080”*

Ah, YAML is whitespace sensitive and it appears that you have put all of the lines at the same level of indentation. Try copying the YAML file from the first post in the thread into an editor and just edit the XX fields without changing any of the whitespace.