Closed txomon closed 8 years ago
Take a look at https://github.com/md5/docker-postgis
But, wouldn't it be possible to add postgis here?
Definitely possible (as the simple Dockerfiles linked above demonstrate), but is it something that upstream recommends be installed with every install of postgres? I was under the impression that it's an optional add-on. It's also really trivial to install, so I'm interested in more details on the use case.
We could add tags for postgres:9.3-postgis
versions. It is not hard to install, but this would be convenient if enough users need it.
Maybe @jberkus would want to weigh in since he is from Postgres upstream.
On 11/03/2014 09:19 AM, yosifkit wrote:
We could add tags for
postgres:9.3-postgis
versions. It is not hard to install, but this would be convenient if enough users need it.Maybe @jberkus would want to weigh in since he is from Postgres upstream.
Likely anyone wanting postgis will want other geo stack stuff too as well?
Regardless, the PostGIS version should be a separate image, since it comes with something like 100MB of additional dependancies, some of which need to be compiled for some version combos.
Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com
Hi,
Le lundi 3 novembre 2014 18:57:44, Josh Berkus a écrit :
On 11/03/2014 09:19 AM, yosifkit wrote:
We could add tags for
postgres:9.3-postgis
versions. It is not hard to install, but this would be convenient if enough users need it.Maybe @jberkus would want to weigh in since he is from Postgres upstream.
Likely anyone wanting postgis will want other geo stack stuff too as well?
Regardless, the PostGIS version should be a separate image, since it comes with something like 100MB of additional dependancies, some of which need to be compiled for some version combos.
It depends on which optional parts of PostGIS you want, but I would rather have a separate image with a full-featured PostGIS, than a simplified PostGIS in the default PostgreSQL image.
Parts of PostGIS which would be good to include :
And while we are at generating a GIS-aware database image, we should also include the following extensions which work with PostGIS :
I already had a try on such an image here : http://www.postgresql.org/mailpref/pgsql-pkg-docker It is based on phusion baseimage though, and has some shortcoming, beside not being supported officially by the community.
I am willing to give a hand to any effort towards having a Postgresql-GIS Docker setup.
Vincent
We can have the new "full-featured PostGIS" image defined in this same repo. We will keep the base Postgres images and then make a subdirectory in each version, like 9.3/postgis
, with a new Dockerfile
. This would be similar to how we do the onbuild
tags for other images (ex: node). The regular Postres images would stay small and then there would be tags for postgis for those that need it.
If 8.4 - 9.4 are all similar enough, we can create a second template for them like Dockerfile.template
and adjust the update.sh
script.
happy anniversary? :)
I got here while trying to look for a way to get postgis working in the container.
I'm assuming the way to do it is with the following Dockerfile
:
FROM postgres
RUN apt-get update && apt-get install postgis
(I'm asking because I only started working with Docker yesterday)
yeah, except that's not the package name. Look up the package name for the version of Postgres you're using.
There is a package called postgis
, but maybe it's a dummy package that points to one of the postgresql-9.X-postgis-2.X
packages.
oh.. postgis
seems to pull in the lastest version of postgres despite the version of the image.
So for 9.3 I used the following and it seems to be working fine:
FROM postgres:9.3
RUN apt-get update && apt-get -y install postgresql-9.3-postgis-2.1
@tisdall As I commented earlier, I've got a working postgis
image on Docker Hub at mdillon/postgis
(among others I'm sure). Here's my Dockerfile
for Postgres 9.3 with PostGIS 2.1: https://github.com/appropriate/docker-postgis/tree/master/9.3-2.1
@md5 - I posted to hopefully encourage @yosifkit to implement what he suggested so there'd be postgis versions of each postgres image. However, I really have no idea how much demand there is for that other than myself wanting it.
I hadn't noticed that comment in my latest read-through of this issue, but I'm surprised @yosifkit suggested that. PostGIS doesn't seem akin to the “onbuild" situation to me. It seems like it should be a separate image.
As for demand, it's non-negligible, but not huge. My mdillon/postgis
image has 30k+ pulls.
I'm definitely +1 on @md5's postgis image, and on keeping it separate.
Okay, I switched over to using mdillon/postgis
. Thanks @md5 !
@tisdall :metal:
Hi, I am coming from https://github.com/orchardup/docker-postgresql, and seems like it's not full replacement, as postgis isn't being installed. Would it be possible to get postgis also installed?