Sudo apt search postgresql-9.6-postgis-2.4 returns no result

Why the package postgresql-9.6-postgis-2.4 is not available on postgres:9.6 and how to make it available? I am trying to install postgis and trying to avoid image mdillon/postgis:9.6

docker:
  - image: circleci/ruby:2.2.9-node-browsers
    environment:
      RAILS_ENV: test
      RACK_ENV: test
      PGHOST: 127.0.0.1
      PGUSER: root
  - image: circleci/postgres:9.6
    environment:
      POSTGRES_USER: root
      POSTGRES_DB: circle-test_test
- run: sudo apt search postgresql-9.6-postgis-2.4

57%20PM

Ah, all run commands are executed in the context of the first image (the Ruby/Node image), so you’d be installing PostgreSQL GIS on your build image that (presumably) does not actually have PostgreSQL on it.

If you want to install the GIS stuff, you’d need to do it on an container containing PostgreSQL. There’s a few ways to do this:

  • Drop the second image and install PostgreSQL server itself in your build image
  • Create a separate Git repo and CircleCI project to build a PostgreSQL + GIS image and then pull this in to use it. I’ve not done this, but I believe it is possible.
  • Create a custom PostgreSQL + GIS image and pull this in to run it in a Docker Compose configuration

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.