Coder Social home page Coder Social logo

Postgis not installed about postgres HOT 19 CLOSED

txomon avatar txomon commented on July 24, 2024
Postgis not installed

from postgres.

Comments (19)

md5 avatar md5 commented on July 24, 2024

Take a look at https://github.com/md5/docker-postgis

from postgres.

txomon avatar txomon commented on July 24, 2024

But, wouldn't it be possible to add postgis here?

from postgres.

tianon avatar tianon commented on July 24, 2024

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.

from postgres.

yosifkit avatar yosifkit commented on July 24, 2024

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.

from postgres.

jberkus avatar jberkus commented on July 24, 2024

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

from postgres.

jberkus avatar jberkus commented on July 24, 2024

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 :

  • PostGIS core, mainly needs GEOS, PROJ
  • Raster (now default) mainly needs GDAL
  • Topology (no dependency)
  • 3D with SFCGAL (needs SFCGAL, CGAL, BOOST at least)

And while we are at generating a GIS-aware database image, we should also
include the following extensions which work with PostGIS :

  • PointCloud (no dependency, no package yet afaik)
  • PgRouting (mainly needs Boost)

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

from postgres.

yosifkit avatar yosifkit commented on July 24, 2024

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.

from postgres.

tisdall avatar tisdall commented on July 24, 2024

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)

from postgres.

jberkus avatar jberkus commented on July 24, 2024

yeah, except that's not the package name. Look up the package name for the version of Postgres you're using.

from postgres.

tisdall avatar tisdall commented on July 24, 2024

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.

from postgres.

tisdall avatar tisdall commented on July 24, 2024

oh.. postgis seems to pull in the lastest version of postgres despite the version of the image.

from postgres.

tisdall avatar tisdall commented on July 24, 2024

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

from postgres.

md5 avatar md5 commented on July 24, 2024

@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

from postgres.

tisdall avatar tisdall commented on July 24, 2024

@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.

from postgres.

md5 avatar md5 commented on July 24, 2024

from postgres.

md5 avatar md5 commented on July 24, 2024

As for demand, it's non-negligible, but not huge. My mdillon/postgis image has 30k+ pulls.

from postgres.

tianon avatar tianon commented on July 24, 2024

from postgres.

tisdall avatar tisdall commented on July 24, 2024

Okay, I switched over to using mdillon/postgis. Thanks @md5 !

from postgres.

md5 avatar md5 commented on July 24, 2024

@tisdall 🤘

from postgres.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.