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
Sparc Splunk
  • 93
  • 1
  • 1
  • 5

1 Answers1

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

zageyiff
  • 465
  • 5
  • 10
  • One more docker image. Postgres 13/14/15, Debian/Alpine based, amd64/arm64 supported https://hub.docker.com/r/sibedge/postgres-plv8 – ChelowekKot Dec 05 '22 at 09:02