Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify docker image #12

Merged
merged 17 commits into from
Jul 18, 2019
Merged
57 changes: 44 additions & 13 deletions 2.6.1/pg10/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,47 @@
FROM pgrouting/postgres:pg10
FROM postgres:10

# Environment
ENV POSTGIS_MAJOR 2.5
ENV PGROUTING_VERSION 2.6.1
ENV CGAL_VERSION 4.9
ENV OSM2PGR_VERSION 2.3.5

# Sources
ADD https://github.com/pgRouting/pgrouting/archive/v${PGROUTING_VERSION}.tar.gz $ROOTDIR/src/
ADD https://github.com/CGAL/cgal/archive/releases/CGAL-${CGAL_VERSION}.tar.gz $ROOTDIR/src/
ADD https://github.com/pgRouting/osm2pgrouting/archive/v${OSM2PGR_VERSION}.tar.gz $ROOTDIR/src/
ADD resources/compile.sh $ROOTDIR/src/

# Compilation
RUN chmod 777 $ROOTDIR/src/compile.sh
RUN $ROOTDIR/src/compile.sh
RUN apt update \
&& apt install -y \
build-essential \
cmake \
perl \
wget \
libboost-graph-dev \
libcgal-dev \
libpq-dev \
postgresql-${PG_MAJOR}-postgis-${POSTGIS_MAJOR} \
postgresql-server-dev-${PG_MAJOR} \
&& cd /usr/local/src \
&& wget https://github.com/pgRouting/pgrouting/archive/v${PGROUTING_VERSION}.tar.gz \
&& tar xvf v${PGROUTING_VERSION}.tar.gz \
&& cd pgrouting-${PGROUTING_VERSION} \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make \
&& make install \
&& cd ../../ \
&& rm -rf ./* \
&& apt purge -y \
build-essential \
cmake \
perl \
wget \
libcgal-dev \
libpq-dev \
postgresql-server-dev-${PG_MAJOR} \
&& apt install -y \
postgresql-${PG_MAJOR}-postgis-${POSTGIS_MAJOR}-scripts \
libboost-atomic1.62.0 \
libboost-chrono1.62.0 \
libboost-graph1.62.0 \
libboost-date-time1.62.0 \
libboost-program-options1.62.0 \
libboost-system1.62.0 \
libboost-thread1.62.0 \
libcgal12 \
&& apt autoremove -y \
&& rm -rf /var/lib/apt/lists/*
2 changes: 1 addition & 1 deletion 2.6.1/pg10/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# pgRouting 2.6.1 (pg10)

pgRouting Docker image (version 2.6.1) built over [Postgres 10 with PostGIS](../../postgres/pg10) and dependencies.
pgRouting Docker image (version 2.6.1) built over [Postgres 10](https://hub.docker.com/_/postgres) and dependencies.
4 changes: 2 additions & 2 deletions 2.6.1/pg10/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ services:
ports:
- "5432:5432"
volumes:
- db-data:/data
- db-data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWD=postgres
- POSTGRES_PASSWORD=postgres
volumes:
db-data:
44 changes: 44 additions & 0 deletions 2.6.1/pg10/extra/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
FROM pgrouting/pgrouting:2.6.1-10

ENV OSM2PGROUTING_VERSION 2.3.6

RUN apt update \
&& apt install -y \
build-essential \
cmake \
wget \
libboost-program-options-dev \
libexpat1 \
libexpat-dev \
libosmium2-dev \
libpqxx-dev \
zlib1g-dev \
&& cd /usr/local/src \
&& wget https://github.com/pgRouting/osm2pgrouting/archive/v${OSM2PGROUTING_VERSION}.tar.gz \
&& tar xvf v${OSM2PGROUTING_VERSION}.tar.gz \
&& cd osm2pgrouting-${OSM2PGROUTING_VERSION} \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make \
&& make install \
&& cd ../tools/osmium/ \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make \
&& make install \
&& cd /usr/local/src \
&& rm -rf ./* \
&& apt purge -y \
build-essential \
cmake \
wget \
libexpat-dev \
libosmium2-dev \
libpqxx-dev \
zlib1g-dev \
&& apt install -y \
libpqxx-4.0v5 \
&& apt autoremove -y \
&& rm -rf /var/lib/apt/lists/*
63 changes: 0 additions & 63 deletions 2.6.1/pg10/resources/compile.sh

This file was deleted.

57 changes: 44 additions & 13 deletions 2.6.1/pg11/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,47 @@
FROM pgrouting/postgres:pg11
FROM postgres:11

# Environment
ENV POSTGIS_MAJOR 2.5
ENV PGROUTING_VERSION 2.6.1
ENV CGAL_VERSION 4.9
ENV OSM2PGR_VERSION 2.3.5

# Sources
ADD https://github.com/pgRouting/pgrouting/archive/v${PGROUTING_VERSION}.tar.gz $ROOTDIR/src/
ADD https://github.com/CGAL/cgal/archive/releases/CGAL-${CGAL_VERSION}.tar.gz $ROOTDIR/src/
ADD https://github.com/pgRouting/osm2pgrouting/archive/v${OSM2PGR_VERSION}.tar.gz $ROOTDIR/src/
ADD resources/compile.sh $ROOTDIR/src/

# Compilation
RUN chmod 777 $ROOTDIR/src/compile.sh
RUN $ROOTDIR/src/compile.sh
RUN apt update \
&& apt install -y \
build-essential \
cmake \
perl \
wget \
libboost-graph-dev \
libcgal-dev \
libpq-dev \
postgresql-${PG_MAJOR}-postgis-${POSTGIS_MAJOR} \
postgresql-server-dev-${PG_MAJOR} \
&& cd /usr/local/src \
&& wget https://github.com/pgRouting/pgrouting/archive/v${PGROUTING_VERSION}.tar.gz \
&& tar xvf v${PGROUTING_VERSION}.tar.gz \
&& cd pgrouting-${PGROUTING_VERSION} \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make \
&& make install \
&& cd ../../ \
&& rm -rf ./* \
&& apt purge -y \
build-essential \
cmake \
perl \
wget \
libcgal-dev \
libpq-dev \
postgresql-server-dev-${PG_MAJOR} \
&& apt install -y \
postgresql-${PG_MAJOR}-postgis-${POSTGIS_MAJOR}-scripts \
libboost-atomic1.62.0 \
libboost-chrono1.62.0 \
libboost-graph1.62.0 \
libboost-date-time1.62.0 \
libboost-program-options1.62.0 \
libboost-system1.62.0 \
libboost-thread1.62.0 \
libcgal12 \
&& apt autoremove -y \
&& rm -rf /var/lib/apt/lists/*
2 changes: 1 addition & 1 deletion 2.6.1/pg11/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# pgRouting 2.6.1 (pg11)

pgRouting Docker image (version 2.6.1) built over [Postgres 11 with PostGIS](../../postgres/pg11) and dependencies.
pgRouting Docker image (version 2.6.1) built over [Postgres 11](https://hub.docker.com/_/postgres) and dependencies.
4 changes: 2 additions & 2 deletions 2.6.1/pg11/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ services:
ports:
- "5432:5432"
volumes:
- db-data:/data
- db-data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWD=postgres
- POSTGRES_PASSWORD=postgres
volumes:
db-data:
44 changes: 44 additions & 0 deletions 2.6.1/pg11/extra/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
FROM pgrouting/pgrouting:2.6.1-11

ENV OSM2PGROUTING_VERSION 2.3.6

RUN apt update \
&& apt install -y \
build-essential \
cmake \
wget \
libboost-program-options-dev \
libexpat1 \
libexpat-dev \
libosmium2-dev \
libpqxx-dev \
zlib1g-dev \
&& cd /usr/local/src \
&& wget https://github.com/pgRouting/osm2pgrouting/archive/v${OSM2PGROUTING_VERSION}.tar.gz \
&& tar xvf v${OSM2PGROUTING_VERSION}.tar.gz \
&& cd osm2pgrouting-${OSM2PGROUTING_VERSION} \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make \
&& make install \
&& cd ../tools/osmium/ \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make \
&& make install \
&& cd /usr/local/src \
&& rm -rf ./* \
&& apt purge -y \
build-essential \
cmake \
wget \
libexpat-dev \
libosmium2-dev \
libpqxx-dev \
zlib1g-dev \
&& apt install -y \
libpqxx-4.0v5 \
&& apt autoremove -y \
&& rm -rf /var/lib/apt/lists/*
63 changes: 0 additions & 63 deletions 2.6.1/pg11/resources/compile.sh

This file was deleted.

Loading