Description
I have been using PGO v5 for a while now, and it's great. Unfortunately, it doesn't come with the PLV8 extension, which I need.
Thus, I resorted to a hacky way of enabling it:
- fire up a disposable VM with vagrant
- clone the crunchy-containers repo
- apply a patch to make it build using rocky linux instead of centos8 which is dead
- build my postgres container in a two stage build
stage 1
an intermediate container is created extending the one I need: crunchy-postgres-gis:centos8-*
inside this intermediate container, plv8 is built. The generated libraries are zipped at the end of the process. The same goes for other stuff I need, such as mysql_fdw
stage2
a new final container is built extending the same base crunchy-postgres-gis:centos8-*
the zipped libraries are copied from the intermediate container, and extracted to their location
The result is good, the extensions work as intended, no issues whatsoever. Bloat in the final images is minimal as the heavy chromium compilation happens in a temporary container which is discarded.
I wrote this hoping that any of that may be useful to you to reconsider adding plv8 and other useful extensions to the official containers, maybe as options.