Skip to content

Commit ab0fd23

Browse files
committed
Update postgres install instructions
1 parent 606687a commit ab0fd23

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

Dockerfile.ubuntu

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ FROM ubuntu:latest AS base
22

33
ARG POSTGRES_VERSION=15
44

5-
RUN apt-get -y update && apt-get -y install lsb-release ca-certificates wget gnupg && \
6-
echo "deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
7-
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
5+
RUN apt-get -y update && \
6+
apt-get -y install curl ca-certificates lsb-release && \
7+
install -d /usr/share/postgresql-common/pgdg && \
8+
curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc && \
9+
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' && \
810
apt-get -y update
911

1012
RUN apt-get -y install postgresql-client-$POSTGRES_VERSION

README.md

+17-15
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1-
# binaryoverload/postgresql-client
2-
![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/)
1+
# binaryoverload/postgresql-client
32

3+
![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/)
44

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

1516
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-
- 16
17-
- 15
18-
- 14
19-
- 13
20-
- 12
17+
18+
- 16
19+
- 15
20+
- 14
21+
- 13 (Ubuntu only)
22+
- 12 (Ubuntu only)
2123

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

0 commit comments

Comments
 (0)