Created
November 11, 2013 18:27
-
-
Save Mistobaan/7417891 to your computer and use it in GitHub Desktop.
docker file for ubuntu
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
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add - ; \ | |
apt-get update; \ | |
apt-get -y install postgresql-9.3-postgis | |
apt-get -y install postgresql-contrib | |
# Setup PostgreSQL | |
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.3/main/pg_hba.conf | |
RUN echo "host all docker 0.0.0.0/0 trust" >> /etc/postgresql/9.3/main/pg_hba.conf | |
RUN echo "listen_addresses = '*'" >> /etc/postgresql/9.3/main/postgresql.conf | |
RUN echo "port = 5432" >> /etc/postgresql/9.3/main/postgresql.conf | |
RUN wget http://download.osgeo.org/postgis/source/postgis-2.1.1.tar.gz | |
RUN tar xzvf postgis-2.1.1.tar.gz | |
RUN cd postgis-2.1.1/extras/tiger_geocoder/tiger_2011 | |
ADD tiger_loader_2013.sql postgis-2.1.1/extras/tiger_geocoder/tiger_2011/tiger_loader_2013.sql | |
ADD create_geocode.sh postgis-2.1.1/extras/tiger_geocoder/tiger_2011/create_geocode.sh | |
ADD install_tiger_geocoder.sh /install_tiger_geocoder.sh | |
RUN chmod u+x ./install_tiger_geocoder.sh | |
RUN sh -c ./install_tiger_geocoder.sh | |
CMD ["sh", "-c", "/etc/init.d/postgresql start && tail -f /var/log/postgresql/postgresql-9.3-main.log"] | |
EXPOSE 5432 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment