GithubHelp home page GithubHelp logo

mikenye / docker-virtualradarserver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wiseman/docker-rpi-vrs

21.0 2.0 3.0 5.88 MB

Multi-architecture image for running Virtual Radar Server (amd64, arm/v7, arm64)

Dockerfile 92.95% Shell 7.05%

docker-virtualradarserver's Introduction

mikenye/virtualradarserver

Docker container for Virtual Radar Server (http://www.virtualradarserver.co.uk).

Builds and runs on x86_64, arm32v6, arm32v7 and arm64v8 (and possibly other architectures).


VRS logo Virtual Radar Server

Virtual Radar Server (VRS) plots aircraft positions on a map.

VRS is an open-source .NET application that runs a local web server.

You can connect to the web server with any modern browser and see the aircraft plotted on a map.

This container is designed to work in conjunction with a Mode-S / BEAST provider. Check out mikenye/readsb or mikenye/piaware for this, or BYO.


Quick Start

NOTE: The Docker command provided in this quick start is given as an example and parameters should be adjusted to suit your needs.

Launch the VRS docker container with the following commands:

docker volume create vrsconfig
docker run -d \
    --name=vrs \
    -p 8080:8080 \
    -e USERNAME=vrsadmin \
    -e PASSWORD=very_secure_password_123 \
    -e BASESTATIONHOST=readsb \
    -v vrsconfig:/config \
    mikenye/virtualradarserver

Browse to http://dockerhost:8080/VirtualRadar/ to access the VRS GUI.

Browse to http://dockerhost:8080/VirtualRadar/WebAdmin/Index.html to access the Admin area.

Usage

docker run [-d] \
    --name=vrs \
    [-e <VARIABLE_NAME>=<VALUE>]... \
    [-v <HOST_DIR>:<CONTAINER_DIR>[:PERMISSIONS]]... \
    [-p <HOST_PORT>:<CONTAINER_PORT>]... \
    mikenye/virtualradarserver
Parameter Description
-d Run the container in background. If not set, the container runs in foreground.
-e Pass an environment variable to the container. See the Environment Variables section for more details.
-v Set a volume mapping (allows to share a folder/file between the host and the container). See the Data Volumes section for more details.
-p Set a network port mapping (exposes an internal container port to the host). See the Ports section for more details.

Environment Variables

To customize some properties of the container, the following environment variables can be passed via the -e parameter (one for each variable). Value of this parameter has the format <VARIABLE_NAME>=<VALUE>.

Variable Description Default
TZ [TimeZone] of the container. Optional. Timezone can also be set by mapping /etc/localtime between the host and the container. Etc/UTC
USERNAME Username for the admin area. Required.
PASSWORD Password for the admin area. Required.
BASESTATIONHOST IP/hostname of dump1090/readsb or another program/device providing Basestation protocol data. Optional.
BASESTATIONPORT TCP port for program/device providing Basestation protocol data. Optional. 30003
BEASTHOST IP/hostname of dump1090/readsb or another program/device providing BEAST protocol data. Optional.
BEASTPORT TCP port for program/device providing BEAST protocol data. Optional. 30005
MLATHOST IP/hostname of dump1090/readsb/mlat-client or another program/device providing MLAT protocol data. Optional.
MLATPORT TCP port for program/device providing MLAT protocol data. Optional. 30105

Data Volumes

The following table describes data volumes used by the container. The mappings are set via the -v parameter. Each mapping is specified with the following format: <NAMED_VOL>:<CONTAINER_DIR>[:PERMISSIONS].

Container path Permissions Description
/config rw This is where the application stores its configuration, log, operator flags and silhouette images, and any other files needing persistency. If mounted, this must be a named volume.

As mentioned above, /config needs to be a named volume. A bind mount won't work properly.

The docker run command initializes the newly created volume with any data that exists at the specified location within the base image. However, this only works for named volumes, not bind mounts (see moby/moby#17470).

If you want to map the container's /config to a specific path on your system, you can:

  1. Use the docker volume create command with arguments, eg:
docker volume create vrsconfig --opt o="bind" --opt device="/path/to/vrs/config" --opt type="none"
  1. If using docker-compose, use the following syntax in your docker-compose.yml, eg:
version: '2.0'

volumes:
  vrsconfig:
    driver: local
    driver_opts:
      type: 'none'
      o: 'bind'
      device: '/path/to/vrs/config'

services:
  virtualradarserver:
    image: mikenye/virtualradarserver:latest
    tty: true
    container_name: vrs
    restart: always
    volumes:
      - vrsconfig:/config
    ports:
      - 8077:8080
    environment:
      - USERNAME=vrsadmin
      - PASSWORD=vrsadmin
      - BASESTATIONHOST=readsb

Change /path/to/vrs/config to a directory on your system. Please be mindful that the contents of this directory (if it exists) will be overwritten with the contents of /config from the docker image.

Ports

Here is the list of ports used by the container. They can be mapped to the host via the -p parameter (one per port mapping). Each mapping is defined in the following format: <HOST_PORT>:<CONTAINER_PORT>. The port number inside the container cannot be changed, but you are free to use any port on the host side.

Port Mapping to host Description
8080 Recommended Port used to access VRS's web GUI.

Docker Compose File

Here is an example of a docker-compose.yml file that can be used with Docker Compose.

Make sure to adjust according to your needs.

version: '2.0'
volumes:
  vrsconfig:
services:
  vrs:
    image: mikenye/virtualradarserver
    tty: true
    container_name: vrs
    restart: always
    ports:
      - 8080:8080
    environment:
      - USERNAME=vrsadmin
      - PASSWORD=very_secure_password_123
      - BASESTATIONHOST=readsb
    volumes:
      - vrsconfig:/config

Getting Help

Having troubles with the container or have questions? Please create a new issue.

I also have a Discord channel, feel free to join and converse.

docker-virtualradarserver's People

Contributors

mikenye avatar wiseman avatar

Stargazers

Anthony Hicks avatar Ben Arblaster avatar Gerad Munsch avatar Andy Jones avatar Get your own 'tots. Geez! avatar Kai Pfister avatar  avatar  avatar  avatar  avatar Marc Quinton avatar NightDragon avatar Kevin Le avatar Hodgkiss avatar  avatar  avatar John D. Swanson avatar Thomas Baxter avatar Alan Bryant avatar Kyle Gordon avatar  avatar

Watchers

 avatar  avatar

docker-virtualradarserver's Issues

Data Volume on Synology DSM 7.0?

Not a bug, but a question. Anyone know how to configure the Data Volume settings on Docker on Synology DSM 7.x?

I'm running this docker image a Synology w/ DSM 7.x via the Synology Docker app. It's working. The container starts successfully once I specify USERNAME and PASSWORD, successfully connects to my dump1090 server, and both the Desktop and Admin web pages are working. Sweet!

But I can't figure out how to specify a Data Volume so it creates & uses a specified file share folder for silhouettes and plugins.

I tried creating a container volume with a mount path of /vrsconfig to the default "docker" DSM share. The docker image runs fine - no errors in the log. But no new folders are created on the DSM share, so I don't think it's using it. On the admin page, Flags Folder = /config/operatorflags and Silhouettes Folder = /config/silhouettes, and I am seeing operator flags in the UI, so they exist somewhere. I'd just like to have them accessible on the DSM share so I can use other sources for flags, silhouettes, and photos.

I also tried changing the HOME path from /config to /vrsconfig with the container volume. But then I get many errors on startup; "[ERROR] FATAL UNHANDLED EXCEPTION: System.UnauthorizedAccessException: Access to the path '/vrsconfig/.local/share/VirtualRadar' is denied. ---> System.IO.IOException: Permission denied". So that's not a good plan ;-).

So again, not a bug so much as a question if anyone has any synology-specific advice on how to configure this?

And thanks for the work on this! It's very cool to see VRS running in a Docker container vs. needing a linux/win machine running to host ๐Ÿ‘

Wrong image used in example

In one of your Docker Compose examples, the wrong image is being referred to:

services:
  virtualradarserver:
    image: vrstest:latest

Should be

services:
  virtualradarserver:
    image: mikenye/virtualradarserver:latest

Running fails, directories not available

Running the container fails with the following error:

# docker-compose up vrs
Pulling vrs (mikenye/virtualradarserver:latest)...
latest: Pulling from mikenye/virtualradarserver
54fec2fa59d0: Pull complete
583304b1b9b3: Pull complete
4d67f55efeff: Pull complete
48aabf0914f5: Pull complete
74a3d1988095: Pull complete
Digest: sha256:b7deae8a62ac1fb056f27f9919b9f959dc4d93cd60827dd4f37bc527fd16f5b8
Status: Downloaded newer image for mikenye/virtualradarserver:latest
Creating vrs ... done
Attaching to vrs
vrs             | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
vrs             | [s6-init] ensuring user provided files have correct perms...exited 0.
vrs             | [fix-attrs.d] applying ownership & permissions fixes...
vrs             | [fix-attrs.d] done.
vrs             | [cont-init.d] executing container initialization scripts...
vrs             | [cont-init.d] 01-vrs: executing...
vrs             | Installing operator flags...
vrs             | cp: target '/config/operatorflags' is not a directory
vrs             | cp: target '/config/operatorflags' is not a directory
vrs             | chown: cannot access '/config/operatorflags': No such file or directory
vrs             | Installing silhouettes...
vrs             | cp: target '/config/silhouettes/' is not a directory
vrs             | chown: cannot access '/config/silhouettes': No such file or directory
vrs             | [cont-init.d] 01-vrs: exited 1.
vrs             | [cont-finish.d] executing container finish scripts...
vrs             | [cont-finish.d] done.
vrs             | [s6-finish] waiting for services.
vrs             | [s6-finish] sending all processes the TERM signal.
vrs             | [s6-finish] sending all processes the KILL signal and exiting.

My docker-compose looks as follows:

version: '3.7'
services:
  vrs:
    image: mikenye/virtualradarserver:latest
    container_name: vrs
    tty: true
    volumes:
    - ${USERDIR}/virtualradarserver:/config
    ports:
    - 8787:8080
    environment:
    - TZ=${TZ}
    - BASESTATIONHOST=192.168.10.6
    - USERNAME=admin
    - PASSWORD=admin
    network_mode: bridge
    restart: unless-stopped

When manually adding the two directories, docker continues, but does download and install each time the operator_flags, which take quite some time...

BASESTATIONHOST receiving from readsb-protobuf docker?

What is the docker run command, and/or webadmin/settings for connecting a data receiver that is running in another container on the same host system?

I am running the basic default docker installation of readsb-protobuf. And was hoping this docker would easily connect to it for data.

I set BASESTATIONHOST=localhost
readsb-protobuf seems to use 30005, but docker-virtualradarserver looking for 30003

Also, not sure the BASESTATIONHOST format. Should it be BaseStation, Beast Raw Feed, or something else?

Thanks.

Receiver Range / Coverage lines

How do I turn on the receiver range 'lines' I have it on my Windows VRS but I can't figure out how to turn them on. I've enable them in 'Internet users can see receiver range plots' but still no go ? It's very useful to have and see my range / coverage over time

Docker Container crashes

Hi,
I'm trying to host a docker container on my Oracle server.

This is my docker-compose.yml (I'm using traefik):

version: '2.0'

volumes:
  vrsconfig:

services:
  virtualradarserver:
    image: mikenye/virtualradarserver:latest
    tty: true
    container_name: vrs
    restart: always
    volumes:
      - /opt/docker/virtualradarserver/vrsconfig:/config
    environment:
      - USERNAME=MYUSERNAME
      - PASSWORD='MYPASSWORD'
      - BASESTATIONHOST=readsb
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.virtualradarserver.entrypoints=websecure"
      - "traefik.http.routers.virtualradarserver.rule=Host(`vrs.MYSUBDOMAIN.duckdns.org`)"
      - "traefik.http.routers.virtualradarserver.tls=true"
      - "traefik.http.routers.virtualradarserver.tls.certresolver=http_resolver"
      - "traefik.http.routers.virtualradarserver.service=virtualradarserver"
      - "traefik.http.services.virtualradarserver.loadbalancer.server.port=8080"
      - "traefik.docker.network=proxy"
      - "traefik.http.routers.virtualradarserver.middlewares=default@file"
networks:
  proxy:
    external: true

When I start the container, I receive the following:

user@ubuntu:/opt/docker/virtualradarserver$ docker compose up
[+] Running 2/2
 โœ” Network virtualradarserver_default  Created                                                                                                                                          0.1s
 โœ” Container vrs                       Created                                                                                                                                          0.0s
Attaching to vrs
vrs  | [s6-init] making user provided files available at /var/run/s6/etc...
vrs  | exited 0.
vrs  | [s6-init] ensuring user provided files have correct perms...
vrs  | exited 0.
vrs  | [fix-attrs.d] applying ownership & permissions fixes...
vrs  | [fix-attrs.d] done.
vrs  | [cont-init.d] executing container initialization scripts...
vrs  | [cont-init.d] 01-sanity_check: executing...
vrs  | WARNING: TZ environment variable not set
vrs  | [cont-init.d] 01-sanity_check: exited 0.
vrs  | [cont-init.d] 02-vrs_extras: executing...
vrs  | Installing operator flags...
vrs  | cp: target '/config/operatorflags' is not a directory
vrs  | cp: target '/config/operatorflags' is not a directory
vrs  | chown: cannot access '/config/operatorflags': No such file or directory
vrs  | Installing silhouettes...
vrs  | cp: target '/config/silhouettes/' is not a directory
vrs  | chown: cannot access '/config/silhouettes': No such file or directory
vrs  | [cont-init.d] 02-vrs_extras: exited 1.
vrs  | [cont-finish.d] executing container finish scripts...
vrs  | [cont-finish.d] done.
vrs  | [s6-finish] waiting for services.
vrs  | [s6-finish] sending all processes the TERM signal.
vrs  | [s6-finish] sending all processes the KILL signal and exiting.
vrs exited with code 0

What am I doing wrong?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.