Location Tools

Location Tools

  • Docs
  • API
  • Help
  • Blog

›Docker

Getting Started

  • Installing Prerequisites
  • Building JAR
  • Configuration
  • Building Lucene Index
  • Console Examples

API Server

  • API Server
  • API reference

Spark Batch Processing

  • Setting up Spark Cluster
  • Running Spark Application

Docker

  • Docker Setup
  • Pre-Built Image

Docker Setup

Building Docker Image

Sample Build (Massachusetts)

Clone the project on to your machine and build the docker image. This needs ~3 GB disk space to download libpostal data

git clone https://github.com/NFPA/LocationTools.git
cd LocationTools
mvn clean install
docker image build -t nfpa-location-tools .
docker container run -p 8080:8080 nfpa-location-tools

This will start the location tools API on port 8080. The first port of -p parameter is the post of localhost you want to bind to container's port, which is the second part of -p parameter.

For example, if you want to run the API on port 8088 you would execute

docker container run -p 8088:8080 nfpa-location-tools

U.S. Build

Edit the onstart-docker.sh file and change BUILD variable to all instead of sample and then proceed to:

docker image build -t nfpa-location-tools .
docker container run -p 8080:8080 nfpa-location-tools

Exporting Docker Image

To share this build with others you can export the docker image to a tar as follows

docker save -o nfpa-location-tools.tar nfpa-location-tools:latest

Troubleshooting

  • If you get permission errors, use sudo docker instead
Last updated on 12/7/2019 by rahul-pande
← Running Spark ApplicationPre-Built Image →
  • Building Docker Image
    • Sample Build (Massachusetts)
    • U.S. Build
  • Exporting Docker Image
  • Troubleshooting
Location Tools
Docs
Getting StartedAPI Reference
Resources
NFPAHelp
More
BlogGitHub
Facebook Open Source
Copyright © 2019 National Fire Protection Association