Skip to content

Commit

Permalink
Update postgres install instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
woldham-mgs committed Jul 30, 2024
1 parent 606687a commit ab0fd23
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
8 changes: 5 additions & 3 deletions Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ FROM ubuntu:latest AS base

ARG POSTGRES_VERSION=15

RUN apt-get -y update && apt-get -y install lsb-release ca-certificates wget gnupg && \
echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
RUN apt-get -y update && \
apt-get -y install curl ca-certificates lsb-release && \
install -d /usr/share/postgresql-common/pgdg && \
curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc && \
sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' && \
apt-get -y update

RUN apt-get -y install postgresql-client-$POSTGRES_VERSION
32 changes: 17 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
# binaryoverload/postgresql-client
![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/binaryoverload/docker-postgresql-client/docker.yml) [![Docker Hub](https://img.shields.io/badge/Docker%20Hub-gray?logo=docker)](https://hub.docker.com/r/binaryoverload/postgresql-client) [![GitHub](https://img.shields.io/badge/GitHub-black?logo=github&logoColor=white)](https://github.com/binaryoverload/docker-postgresql-client/)
# binaryoverload/postgresql-client

![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/binaryoverload/docker-postgresql-client/docker.yml) [![Docker Hub](https://img.shields.io/badge/Docker%20Hub-gray?logo=docker)](https://hub.docker.com/r/binaryoverload/postgresql-client) [![GitHub](https://img.shields.io/badge/GitHub-black?logo=github&logoColor=white)](https://github.com/binaryoverload/docker-postgresql-client/)

A Docker image for all of the PostgreSQL client executables, including:
- `pg_dump` - Extract a PostgreSQL database into a script file or other archive file
- `pg_dumpall` - Extract a PostgreSQL database cluster into a script file
- `pg_restore` - Restore a PostgreSQL database from an archive file created by pg_dump
- `psql` - PostgreSQL interactive terminal
- `pg_isready` - Check the connection status of a PostgreSQL server
- `pg_basebackup` - Take a base backup of a PostgreSQL cluster
- `pg_verifybackup` - Verify the integrity of a base backup of a PostgreSQL cluster
- [And many more...](https://www.postgresql.org/docs/current/reference-client.html)

- `pg_dump` - Extract a PostgreSQL database into a script file or other archive file
- `pg_dumpall` - Extract a PostgreSQL database cluster into a script file
- `pg_restore` - Restore a PostgreSQL database from an archive file created by pg_dump
- `psql` - PostgreSQL interactive terminal
- `pg_isready` - Check the connection status of a PostgreSQL server
- `pg_basebackup` - Take a base backup of a PostgreSQL cluster
- `pg_verifybackup` - Verify the integrity of a base backup of a PostgreSQL cluster
- [And many more...](https://www.postgresql.org/docs/current/reference-client.html)

This image is intended to be used as a base image for running PostgreSQL scripts and as such is deployed in both Ubuntu (Default) and Alpine distro variants with all major supported versions:
- 16
- 15
- 14
- 13
- 12

- 16
- 15
- 14
- 13 (Ubuntu only)
- 12 (Ubuntu only)

Information on the versions of PostgreSQL and their support periods can be found [at the link here](https://www.postgresql.org/support/versioning/).

0 comments on commit ab0fd23

Please sign in to comment.