Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hartmut-co-uk/pg-repack-docker
Docker image for 'pg_repack' (PostgreSQL extension) to use 'client-side' to run/invoke the actual repack functionality for a PostgreSQL database with the extension installed.
https://github.com/hartmut-co-uk/pg-repack-docker
docker-image maintenance postgres postgresql postgresql-extension postgresql-tool
Last synced: 2 months ago
JSON representation
Docker image for 'pg_repack' (PostgreSQL extension) to use 'client-side' to run/invoke the actual repack functionality for a PostgreSQL database with the extension installed.
- Host: GitHub
- URL: https://github.com/hartmut-co-uk/pg-repack-docker
- Owner: hartmut-co-uk
- Created: 2018-11-21T15:22:19.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-17T22:29:41.000Z (about 1 year ago)
- Last Synced: 2024-08-13T07:15:57.208Z (5 months ago)
- Topics: docker-image, maintenance, postgres, postgresql, postgresql-extension, postgresql-tool
- Language: Shell
- Size: 10.7 KB
- Stars: 34
- Watchers: 1
- Forks: 19
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - hartmut-co-uk/pg-repack-docker - Docker image for 'pg_repack' (PostgreSQL extension) to use 'client-side' to run/invoke the actual repack functionality for a PostgreSQL database with the extension installed. (Shell)
README
# 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.
| postgres | pg_repack |
|----------|-----------|
| 16 | 1.5.0 |
| 15 | 1.4.8 |
| 14 | 1.4.7 |
| 13 | 1.4.6 |
| 12 | 1.4.5 |
| 11 | 1.4.4 |
| 10 | 1.4.3 |## Dockerhub
https://hub.docker.com/r/hartmutcouk/pg-repack-docker/
### build
```
docker build . -t pg-repack-docker
```
### run postgresThis image extends the official [postgres docker image](https://hub.docker.com/_/postgres/) - so you can start a container with postgres following the official image.
e.g. pg16 (+pg_repack 1.5.0):
```
docker run -e POSTGRES_PASSWORD=1234 --name pg16 -p 5432:5432 -d hartmutcouk/pg-repack-docker:1.5.0
```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.0 psql -h localhost -U postgres
```### exec pg_repack against host network
```
docker run -e PGPASSWORD=1234 -it --rm --network host hartmutcouk/pg-repack-docker:1.5.0 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)