Basic postgreSQL Client to be able to use psql, pg_dump, and other client command line
8.9K
Basic postgreSQL Client, to be able to use all the client command line.
Running on latest Alpine.
Curl is added to the image to be able to download backup files locally to restore it into your DB.
FROM alpine
RUN apk update --no-cache && apk upgrade --no-cache && \
apk --no-cache add postgresql-client curl
CMD [ "" ]
docker run -it --rm jnovent/postgres-client:latest psql -p <PORT> -h <DNS_OR_IP> -U <USER> <DB_NAME>
docker run -it --rm jnovent/postgres-client:latest pg_dump -p <PORT> -h <DNS_OR_IP> -U <USER> <DB_NAME> > dump.sql
Passing password like this is clearly not a good idea from a security point of view.
But when you automatize things and make sure the password won't be displayed in CI / CD logs, this is very helpful.
docker run -e PGPASSWORD="<PASSWORD>" -it --rm jnovent/postgres-client:latest ...
Please check the official documentation to know which command you can use with the postreSQL client
Content type
Image
Digest
sha256:2ec6e080d…
Size
8.3 MB
Last updated
6 months ago
docker pull jnovent/postgres-client