Sign inSign up

hartmutcouk/pg-repack-docker

By hartmutcouk

•Updated 8 months ago

Docker image for 'pg_repack' (PostgreSQL extension) to use 'client-side' to run/invoke the repack.

Image
Developer tools
Databases & storage
1

1M+

hartmutcouk/pg-repack-docker repository overview

⁠pg-repack-docker

Docker image with 'pg_repack' (PostgreSQL extension) installed, can be run natively - or be used 'client-side' to run/invoke pg_repack functionality for a PostgreSQL database with the extension installed.

Reference: https://github.com/reorg/pg_repack⁠

⁠versions

This images follows the pg_repack releases + compatibility with PostgreSQL.

postgrespg_repack
171.5.2
171.5.1
161.5.0
151.4.8
141.4.7
131.4.6
121.4.5
111.4.4
101.4.3

⁠Dockerhub

https://hub.docker.com/r/hartmutcouk/pg-repack-docker/⁠

⁠build
docker build . -t pg-repack-docker
⁠run postgres

This image extends the official postgres docker image⁠ - so you can start a container with postgres following the official image.
e.g. pg17 (+pg_repack 1.5.2):

docker run -e POSTGRES_PASSWORD=supersecure --name pg-repack -p 5432:5432 -d hartmutcouk/pg-repack-docker:1.5.2

psql from local:

PGPASSWORD=supersecure psql -h localhost -U postgres

psql via docker:

docker run -e PGPASSWORD=supersecure -it --rm --network host hartmutcouk/pg-repack-docker:1.5.2 psql -h localhost -U postgres
⁠exec pg_repack against host network
docker run -e PGPASSWORD=supersecure -it --rm --network host hartmutcouk/pg-repack-docker:1.5.2 pg_repack -h localhost -U dbroot --dbname=dbname --dry-run --table=table1 --only-indexes --no-superuser-check

Notes:

  • uses host network: --network host
  • passing PGPASSWORD via env variable avoids password prompt (to e.g. exec via script/cron)

Tag summary

Content type

Image

Digest

sha256:ca6686eb0…

Size

411.4 MB

Last updated

8 months ago

docker pull hartmutcouk/pg-repack-docker