Sign inSign up

martinvw/pg_exec

By martinvw

•Updated about 2 years ago

Build container for pg_exec PostgreSQL extension.

Image
0

398

martinvw/pg_exec repository overview

⁠pg_exec

Docker container to build a pg_exec backdoor for different PostgreSQL version. Forked from https://github.com/Dionach/pgexec⁠ and hosted https://github.com/martinvw/pgexec⁠.

⁠Pre-build images

Note that pre-build images are available at: https://github.com/martinvw/pgexec/tree/master/libraries⁠

⁠Using the Container

docker run --rm -v "$(pwd):/opt/pg_exec/libraries" -e PG_MAJOR=11 martinvw/pg_exec

This will build PostgreSQL and the extension from source, output:

[+] Preparing to download PostgreSQL 11...
[-] Failed to download version 11
[-] Warning, will continue using oldest 11 version: 11.0
[+] Preparing to download PostgreSQL 11.0...Done!
[+] Validating hash... 
postgresql-11.0.tar.gz: OK

[+] Building PosgreSQL 11.0 from source... (this can take a while)
[+] Building extension...
[+] Done

If you want to build in bulk you could add the versions to a text file and use the following command:

while read v; do docker run --rm -v "$(pwd)/libraries:/opt/pg_exec/libraries" -e PG_MAJOR=$v martinvw/pg_exec; done < versions.txt

⁠Using the container the cross compile on Apple Silicon (M1)

docker run --platform linux/amd64 --rm -v "$(pwd)/libraries:/opt/pg_exec/libraries" -e PG_MAJOR=11 martinvw/pg_exec

Tag summary

Content type

Image

Digest

sha256:909915570…

Size

172.6 MB

Last updated

about 2 years ago

docker pull martinvw/pg_exec