Skip to content

Commit

Permalink
create a docker container to run nominatim
Browse files Browse the repository at this point in the history
  • Loading branch information
melvinzhang committed Sep 24, 2014
1 parent 565af72 commit b60353d
Show file tree
Hide file tree
Showing 4 changed files with 418 additions and 0 deletions.
51 changes: 51 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
############################################################
# Dockerfile to build nominatim
############################################################

# Set the base image to Ubuntu
FROM ubuntu:12.04

# File Author / Maintainer
MAINTAINER Melvin Zhang

# Set locale
RUN locale-gen --no-purge en_US.UTF-8
ENV LC_ALL en_US.UTF-8

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update

# Install dependencies
RUN apt-get -y install sudo wget

# Note: libgeos++-dev is included here too (the nominatim install page suggests installing it if there is a problem with the 'pear install DB' below - it seems safe to install it anyway)
RUN apt-get -y install build-essential libxml2-dev libgeos-dev libpq-dev libbz2-dev libtool automake libproj-dev libgeos++-dev
RUN apt-get -y install gcc proj-bin libgeos-c1 git osmosis
RUN apt-get -y install php5 php-pear php5-pgsql php5-json

# Some additional packages that may not already be installed
# bc is needed in configPostgresql.sh
RUN apt-get -y install bc

# Install Postgres, PostGIS and dependencies
RUN apt-get -y install postgresql postgis postgresql-contrib postgresql-9.1-postgis postgresql-server-dev-9.1

# Install Apache
RUN apt-get -y install apache2

# Install gdal - which is apparently used for US data (more steps need to be added to this script to support that US data)
RUN apt-get -y install python-gdal

# Add Protobuf support
RUN apt-get -y install libprotobuf-c0-dev protobuf-c-compiler

# Copy the application folder inside the container
ADD . /nominatim

RUN cd /nominatim; ./docker-install.sh

# Set the default directory where CMD will execute
WORKDIR /nominatim

# Set the default command to execute
CMD /bin/sh docker-start.sh
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
start:
docker run -p 8080:80 nominatim

build:
docker build -t nominatim .
Loading

0 comments on commit b60353d

Please sign in to comment.