Skip to content

Docker file with the latest PG12 + POSTGIS 3.0.0 Alpha4 from pgdg testing #148

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

Closed
AlexKovalevich opened this issue Oct 7, 2019 · 7 comments

Comments

@AlexKovalevich
Copy link

AlexKovalevich commented Oct 7, 2019

Here is the code if someone needs it. I don't have time to make pull requests for the other distribs, sorry.

FROM postgres:12
MAINTAINER Mike Dillon <[email protected]>

ENV POSTGIS_MAJOR 3
#ENV POSTGIS_VERSION 2.5.3+dfsg-1~exp1.pgdg100+1
#ENV POSTGIS_VERSION 3.0.0~alpha4+dfsg-2~exp1.pgdg100+1
ENV POSTGIS_VERSION 3.0.0~rc1+dfsg-1~exp2~220.git765f6ff.pgdg100+1

RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg-testing main" >> /etc/apt/sources.list.d/pgdg.list \
      && apt-get update \
      && apt-cache showpkg postgis-$POSTGIS_MAJOR \
      && apt-get install -y --no-install-recommends \
			postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR=$POSTGIS_VERSION \
			postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts=$POSTGIS_VERSION \ 
			postgis=$POSTGIS_VERSION \
      && rm -rf /var/lib/apt/lists/*

RUN mkdir -p /docker-entrypoint-initdb.d
COPY ./initdb-postgis.sh /docker-entrypoint-initdb.d/postgis.sh
COPY ./update-postgis.sh /usr/local/bin
@gaslitbytech
Copy link

A FYI I tried this though got the error

E: Version '3.0.0~alpha4+dfsg-2~exp1.pgdg100+1' for 'postgresql-12-postgis-3' was not found
E: Version '3.0.0~alpha4+dfsg-2~exp1.pgdg100+1' for 'postgresql-12-postgis-3-scripts' was not found
E: Version '3.0.0~alpha4+dfsg-2~exp1.pgdg100+1' for 'postgis' was not found

I was building with

docker build -t pg12-postgis3alpha4 .

@AlexKovalevich
Copy link
Author

AlexKovalevich commented Oct 12, 2019

Looks like they replaced alpha with rc1. The version will likely change often untill GIS 3 Final is released.
Replace POSTGIS_VERSION with

ENV POSTGIS_VERSION 3.0.0~rc1+dfsg-1~exp2~220.git765f6ff.pgdg100+1

Works on the moment of writing

@kriscarle
Copy link

now needs ENV POSTGIS_VERSION 3.0.0+dfsg-2~exp1.pgdg100+1

@LelandB
Copy link

LelandB commented Nov 14, 2019

I'm having a similar issue with postgres 11

E: Version 2.5.2+dfsg-2' for 'postgresql-11-postgis-2.5' was not found E: Version '2.5.2+dfsg-2' for 'postgresql-11-postgis-2.5-scripts' was not found E: Version '2.5.2+dfsg-2' for 'postgis' was not found

banek13 added a commit to banek13/openstreetmap-carto that referenced this issue Dec 17, 2019
@phillipross
Copy link
Contributor

Thanks @AlexKovalevich et al

We're currently working to get updated/current images building on both debian and alpine variants. The master branch can build PostGIS v2.5.3 on PostgreSQL v12 currently, and will be able to build PostGIS v3.x soon. You can review PRs #164 and #166 to see progress if you'd like.

I'm closing this issue as it's somewhat outdated and redundant at this point. Thanks for your patience!

@rodolfocop
Copy link

I'm having a similar problem now and solved it like this:
ENV POSTGIS_VERSION 3.0.1+dfsg-2.pgdg90+1

@phillipross
Copy link
Contributor

Since the contents of the debian repo may change, older package versions may be renamed or removed. This creates somewhat of a stability problem with respect to the container images and the infrastructure used to build them. If you run into the kinds of problems outlined in this issue, they can be resolved by pulling the latest master branch from the git repo and building from that, or pull the latest postgis container image from dockerhub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants