Giter Club home page Giter Club logo

pg-repack-docker's Introduction

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
10 1.4.3
11 1.4.4
12 1.4.5
13 1.4.6

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. pg11 (+pg_repack 1.4.4):

docker run -e POSTGRES_PASSWORD=1234 --name pg11 -p 5432:5432 -d hartmutcouk/pg-repack-docker:1.4.4

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.4.4 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.4.4 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)

pg-repack-docker's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.