-
-
Notifications
You must be signed in to change notification settings - Fork 34
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
Simplify docker image #12
Conversation
Thanks @aruneko . You have done in this PR a lot of work to improve the project! Several things I would like to discuss before proceed:
@cvvergara and @dkastl: What do you think about it? |
2.6.1/pg10/Dockerfile
Outdated
@@ -1,16 +1,46 @@ | |||
FROM pgrouting/postgres:pg10 | |||
FROM mdillon/postgis:10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussing this change in main thread: #12 (comment)
Thanks for your opinion! I understand your concern, and I propose this for pgrouting 2.6.2FROM postgres:11
ENV POSTGIS_MAJOR 2.5
ENV PGROUTING_VERSION 2.6.2
RUN apt update \
&& apt install -y \
build-essential \
cmake \
perl \
wget \
libboost-graph-dev \
libcgal-dev \
libpq-dev \
# install postgis from apt
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/* for pgrouting 3.0.0FROM postgres:11
ENV POSTGIS_MAJOR 2.5
ENV PGROUTING_VERSION develop
RUN apt update \
&& apt install -y \
build-essential \
cmake \
perl \
wget \
libboost-graph-dev \
libpq-dev \
# install postgis from apt
postgresql-${PG_MAJOR}-postgis-${POSTGIS_MAJOR} \
postgresql-server-dev-${PG_MAJOR} \
&& cd /usr/local/src \
&& wget https://github.com/pgRouting/pgrouting/archive/${PGROUTING_VERSION}.tar.gz \
&& tar xvf ${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 \
libpq-dev \
postgresql-server-dev-${PG_MAJOR} \
&& apt install -y \
postgresql-${PG_MAJOR}-postgis-${POSTGIS_MAJOR}-scripts \
libboost-graph1.62.0 \
libboost-program-options1.62.0 \
&& apt autoremove -y \
&& rm -rf /var/lib/apt/lists/* regarding osm2pgroutingThe base image I understand the needs of osm2pgrouting, but for production deployment using public cloud (e.g. AWS, GCP), I hope to save as more disk space as possible. So, I think it is required both of docker image which includes it or not. Because, once we create a docker image, we cannot remove any files from it. But I concern about increase of tags. If possible, I hope to remove support of |
Would it be too much work or a bad idea to make a different Docker image for osm2pgrouting? I think, that it's good to have a way to install the latest one as a Docker container, because distributions are sometimes slow to update. And I understand, that some people won't need it. Not sure, what is the most reasonable solution. But I'm very glad about the discussion and the pull request of @aruneko . It actually shows users of this Docker image, that it is well thought and maintained. |
@aruneko I like new Dockerfiles you are proposing. Could you push these changes to PR? Osm2pgrouting issueI understand your concern about image size and I think in production is important. |
On 7/9/2019 12:14 PM, Cayetano Benavent wrote:
@aruneko <https://github.com/aruneko> I like new Dockerfiles you are
proposing. Could you push these changes to PR?
Osm2pgrouting issue
I understand your concern about image size and I think in production
is important.
@dkastl <https://github.com/dkastl> It looks good to me to maintain 2
Dockerfiles by pRouting version (we can automate it). The question
here is: How we could tag osm2pgrouting image in a clearly way? What
do you think about it?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#12?email_source=notifications&email_token=AAGETAUPC7ELROZ4HWHA3SLP6S2OPA5CNFSM4H6Y5QKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZQYQRQ#issuecomment-509708358>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAGETAV7ZPMCGNBZLYQMFE3P6S2OPANCNFSM4H6Y5QKA>.
How about calling it something like pgRouting-plus? or -fat? to imply
that there are additional things in it. Today it would have
osm2pgrouting, but later we might want to add other stuff to it.
…---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
|
I pushed suggested Dockerfiles. Then, I propose Dockerfile for a docker image includes osm2pgrouting. FROM pgrouting/prgouring:3.0.0-dev-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/* |
Thanks @aruneko . Dockerfile for osm2pgrouting looks good to me (only a typo in name: NamingI think we only need to find a name for this image to differentiate from "main". Following the proposal by @woodbri , I've added another name more (added to docker image "tag"):
What do you think? |
|
@dkastl I like |
3.0.0-dev/pg10/README.md
Outdated
@@ -1,3 +1,3 @@ | |||
# pgRouting 3.0.0-dev (pg10) | |||
|
|||
pgRouting Docker image (version 3.0.0-dev) built over [Postgres 10 with PostGIS](../../postgres/pg10) and dependencies. | |||
pgRouting Docker image (version 3.0.0-dev) built over [Postgres 10 with PostGIS](https://hub.docker.com/r/mdillon/postgis) and dependencies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change link url.
+1 on -extra. better to keep it generic then we can put other stuff into it also and not have to have a separate one for everything we might want to add in the future. |
I pushed Dockerfile for |
Thank you @aruneko I'm going to review all changes to proceed with this PR. |
@aruneko I've changed base branch to development. I will merge with master after some testing. |
Thanks a lot! |
I modified the docker images to simplify it.
For example, the image size of
v3.0.0-dev-postgresql_11
decrease from 1.4GB to 920MB.The changes is below.
pgrouting/postgres
withmdillon/postgis
mdillon/postgis
is based on official Postgres image, well-maintained, and built automatically.postgres
directory.In addition, I think it is required a CI for building
3.0.0-dev
automatically (#4).But to detect
push
for the development branch, we have to place CI settings in pgRouting repository.So if we resolve this issue, we have to consider it.