/docker-postgres-client

Postgres Tools Environment

Primary LanguageShell

Postgres Tools Environment

This Dockerfile builds on the official postgres image and replaces the entry point with one suitable for running Postgres command-line tools, such as psql (the default).

Usage

  1. Edit the Dockerfile to use the same tag/branch of the postgres image as your server container, then build this image locally.

    docker build -t postgres-client .
    
  2. Run this image with a link to your running postgres container.

    docker -it --rm --link my_pg_name:postgres postgres-client psql
    

    Note: psql is the default command and can be omitted.

License

CC0
To the extent possible under law, the person who associated CC0 with this work has waived all copyright and related or neighboring rights to this work.