0

Below is the docker file i am using to build an image. but i get the error when trying to build.

FROM postgres:11.14
RUN apt-get update && apt-get install -y --no-install-recommends \
postgresql-$PG_MAJOR-plv8 \
python-setuptools \
python-wheel \
python-pip

this is the error i receive when trying to build the image

#5 0.785 Get:8 http://apt.postgresql.org/pub/repos/apt stretch-pgdg InRelease [81.6 kB]
#5 1.511 Get:9 http://apt.postgresql.org/pub/repos/apt stretch-pgdg/main amd64 Packages [278 kB]
#5 1.724 Get:10 http://apt.postgresql.org/pub/repos/apt stretch-pgdg/11 amd64 Packages [2,583 B]
#5 1.738 Fetched 8,480 kB in 1s (5,590 kB/s)
#5 1.738 Reading package lists...
#5 2.283 Reading package lists...
#5 2.800 Building dependency tree...
#5 2.911 Reading state information...
#5 2.925 E: Unable to locate package postgresql-11-plv8

2 Answers 2

1

seems postgres won't include 3rd party extensions starting with postgres 11
https://github.com/docker-library/postgres/issues/876

you could extend their postgres image by building the extension
https://plv8.github.io/#building

or use someone else's docker image which already contains the extension
https://github.com/clkao/docker-postgres-plv8

Sign up to request clarification or add additional context in comments.

1 Comment

One more docker image. Postgres 13/14/15, Debian/Alpine based, amd64/arm64 supported hub.docker.com/r/sibedge/postgres-plv8
0

Use our finished docker-images with postgres and PLV8. It's free, images for PostgreSQL 16, PostgreSQL 15, PostgreSQL 14 and PostgreSQL 13 based on Debian and Alpine are available, amd64 and arm64 (with Apple silicon M1/M2/M3 support) architectures maintaned.

docker pull sibedge/postgres-plv8

Default uses Alpine and last Postgres version. All available tags here

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.