Sentry: Error running Dockefile.dev: E: Version '9.4.6-1.pgdg80+1' for 'postgresql-9.4' was not found

Created on 7 Jun 2016  路  13Comments  路  Source: getsentry/sentry

Hello,
I get the following error while trying to set up sentry for local development on Docker using the command:
docker build --rm -t sentry:dev -f Dockerfile.dev .
It fails at step 17:
Error Message:

E: Version '9.4.6-1.pgdg80+1' for 'postgresql-9.4' was not found
E: Version '9.4.6-1.pgdg80+1' for 'postgresql-client-9.4' was not found
E: Version '9.4.6-1.pgdg80+1' for 'postgresql-contrib-9.4' was not found
The command '/bin/sh -c echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list     && apt-get update && apt-get install -y --no-install-recommends         postgresql-common         postgresql-$PG_MAJOR=$PG_VERSION         postgresql-client-$PG_MAJOR=$PG_VERSION         postgresql-contrib-$PG_MAJOR=$PG_VERSION     && rm -rf /var/lib/apt/lists/*     && rm "/etc/postgresql/$PG_MAJOR/main/pg_hba.conf"     && touch "/etc/postgresql/$PG_MAJOR/main/pg_hba.conf"     && chown -R postgres "/etc/postgresql/$PG_MAJOR/main/pg_hba.conf"     && { echo; echo "host all all 0.0.0.0/0 trust"; } >> "/etc/postgresql/$PG_MAJOR/main/pg_hba.conf"     &&  { echo; echo "local all all trust"; } >> "/etc/postgresql/$PG_MAJOR/main/pg_hba.conf"' returned a non-zero code: 100

The command fails at this step in the Dockerfile

Most helpful comment

@MaxBittker possible. I'd rather do this as a docker-compose setup, but nobody really uses this now, and to support docker-compose would mean a bit more restructuring of the testing code. Instead of baking everything into this container, we'd just have composable pieces and run postgres:9.5 container that was networked together, for example.

All 13 comments

Will get this fixed up. Not sure of the best way to keep this up to date since old versions get purged from their PPA. :(

I was wondering how to keep those up to date. Looking forward to seeing your solution.
In the meantime I'm using version 9.4.8-0+deb8u1

got this today:
E: Version '9.5.3-1.pgdg80+1' for 'postgresql-9.5' was not found
Is it possible that this is happening again? It may be a gpg key issue on my end

I'll bump in the morning. The problem is postgres maintainers don't keep around old versions in their PPA. So every release on their side, removes the old package. :(

https://www.postgresql.org/message-id/20160731194944.amiwidhsoqh4osac%40msg.df7cb.de
^ would this morgue help?
Also, out of curiosity, would it be viable to use a stabler release? Thanks

@MaxBittker possible. I'd rather do this as a docker-compose setup, but nobody really uses this now, and to support docker-compose would mean a bit more restructuring of the testing code. Instead of baking everything into this container, we'd just have composable pieces and run postgres:9.5 container that was networked together, for example.

Hit this today

E: Version '9.5.4-1.pgdg80+1' for 'postgresql-9.5' was not found
E: Version '9.5.4-1.pgdg80+1' for 'postgresql-client-9.5' was not found
E: Version '9.5.4-1.pgdg80+1' for 'postgresql-contrib-9.5' was not found

Changing PG_VERSION to 9.5.4-1.pgdg80+2 did the trick.

@mattrobenolt If people are not using this, what's the recommended dev setup?

@torarnv https://docs.sentry.io/internal/environment/ for now. Docker just isn't super usable for our case yet to make it our default dev environment. We would like to at some point, but there are lots of blocking issues yet. Mostly around i/o performance.

@mattrobenolt Thanks, so the macOS instructions on https://docs.sentry.io/internal/environment/ are up to date? I'll go with that then :+1:

Yep, should be! It's what we use internally for employees. So if something is lacking, we would easily add to it.

Thanks! And thanks for developing Sentry in the open, with an open source license. It looks amazing and seems like a really well managed and mature project.

@mattrobenolt
Would it be an option to go with
ENV PG_VERSION 9.5.* instead of ENV PG_VERSION 9.5.4-1.pgdg80+2
since its only meant for the dev environment I think this should be fine.

Something like that. The ideal here would just be a linked container instead, but that's harder for reasons. I'll change to stop pinning to an explicit version since Postgres likes to remove old versions from their PPA. :(

Was this page helpful?
0 / 5 - 0 ratings