-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create a docker container to run nominatim
- Loading branch information
1 parent
565af72
commit b60353d
Showing
4 changed files
with
418 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 . |
Oops, something went wrong.