Skip to content

Commit 1816b3e

Browse files
committed
feat: Upgrade to postgres 14.1
1 parent 87f5455 commit 1816b3e

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ RUN set -e \
2525
apt-get update && \
2626
apt-get install -y --no-install-recommends postgresql-common && \
2727
sed -ri 's/#(create_main_cluster) .*$/\1 = false/' /etc/postgresql-common/createcluster.conf && \
28-
apt-get install -y --no-install-recommends "postgresql-14=14.0-1.pgdg110+1" && \
28+
apt-get install -y --no-install-recommends "postgresql-14=14.1-1.pgdg110+1" && \
2929
echo 'Install pg_auto_failover' && \
3030
sh -c 'curl https://install.citusdata.com/community/deb.sh | bash' && \
31-
apt-get install -y postgresql-14-auto-failover-1.6.2 && \
31+
apt-get install -y postgresql-14-auto-failover-1.6.3 && \
3232
echo 'Install wal-g' && \
3333
curl -L https://github.com/wal-g/wal-g/releases/download/v1.1/wal-g-pg-ubuntu-18.04-amd64 > /usr/local/bin/wal-g && \
3434
chmod +x /usr/local/bin/wal-g && \

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [Postgres 14.0](https://github.com/livingdocsIO/dockerfile-postgres) [![](https://shields.beevelop.com/docker/pulls/livingdocs/postgres.svg?style=flat-square)](https://hub.docker.com/r/livingdocs/postgres)
1+
# [Postgres 14.1](https://github.com/livingdocsIO/dockerfile-postgres) [![](https://shields.beevelop.com/docker/pulls/livingdocs/postgres.svg?style=flat-square)](https://hub.docker.com/r/livingdocs/postgres)
22

33
- Based on Debian
44
- Includes `postgres-contrib`, enables the extensions `pg_stat_statements` and `pg_squeeze` by default
@@ -13,7 +13,7 @@
1313

1414
```bash
1515
# Secured with a password, by default the image is secure
16-
docker run -d --name postgres -p 5432:5432 -v postgres:/var/lib/postgresql -e POSTGRES_PASSWORD=somepassword livingdocs/postgres:14.0
16+
docker run -d --name postgres -p 5432:5432 -v postgres:/var/lib/postgresql -e POSTGRES_PASSWORD=somepassword livingdocs/postgres:14.1
1717
```
1818

1919
## Upgrade an existing postgres container
@@ -24,28 +24,28 @@ docker run -d --name postgres -p 5432:5432 -v postgres:/var/lib/postgresql livin
2424

2525
# First stop it, then run the upgrade image
2626
docker stop postgres
27-
docker run --rm -v postgres:/var/lib/postgresql livingdocs/postgres:14.0-upgrade
27+
docker run --rm -v postgres:/var/lib/postgresql livingdocs/postgres:14.1-upgrade
2828

2929
# After it succeeds, you can run the new image and mount the existing volume
30-
docker run -d --name postgres -p 5432:5432 -v postgres:/var/lib/postgresql livingdocs/postgres:14.0
30+
docker run -d --name postgres -p 5432:5432 -v postgres:/var/lib/postgresql livingdocs/postgres:14.1
3131
```
3232

3333
## To build this image manually
3434

3535
```bash
36-
docker build -t livingdocs/postgres:14.0 .
36+
docker build -t livingdocs/postgres:14.1 .
3737

3838
# To build and push the multi-arch manifest to docker hub
39-
docker buildx build --platform linux/amd64,linux/arm64 -t livingdocs/postgres:14.0 --push .
39+
docker buildx build --platform linux/amd64,linux/arm64 -t livingdocs/postgres:14.1 --push .
4040
```
4141

4242
## Set up streaming replication
4343

4444
### Simple setup
4545
```bash
4646
# Create the containers
47-
docker run -d -p 5433:5432 --name postgres-1 livingdocs/postgres:14.0
48-
docker run -d -p 5434:5432 --name postgres-2 livingdocs/postgres:14.0 standby -d "host=host.docker.internal port=5433 user=postgres target_session_attrs=read-write"
47+
docker run -d -p 5433:5432 --name postgres-1 livingdocs/postgres:14.1
48+
docker run -d -p 5434:5432 --name postgres-2 livingdocs/postgres:14.1 standby -d "host=host.docker.internal port=5433 user=postgres target_session_attrs=read-write"
4949

5050
# Test the replication
5151
docker exec postgres-1 psql -c "CREATE TABLE hello (value text); INSERT INTO hello(value) VALUES('world');"
@@ -63,7 +63,7 @@ docker exec postgres-2 psql -c "SELECT * FROM hello;"
6363
docker network create local
6464

6565
# First create the database primary
66-
docker run -d -p 5433:5432 --name postgres-1 --network=local --network-alias=postgres -e POSTGRES_HOST_AUTH_METHOD=md5 livingdocs/postgres:14.0
66+
docker run -d -p 5433:5432 --name postgres-1 --network=local --network-alias=postgres -e POSTGRES_HOST_AUTH_METHOD=md5 livingdocs/postgres:14.1
6767

6868
# Create the users on database intialization
6969
# You could also mount an sql or script into /var/lib/postgresql/initdb.d during cluster startup to execute the script automatically.
@@ -72,8 +72,8 @@ docker exec postgres-1 psql -c "CREATE USER replication REPLICATION LOGIN ENCRYP
7272

7373
# The launch the replicas
7474
export DB_URL="host=postgres port=5432 user=replication password=some-replication-password target_session_attrs=read-write"
75-
docker run -d -p 5434:5432 --name postgres-2 --network=local --network-alias=postgres livingdocs/postgres:14.0 standby -d $DB_URL
76-
docker run -d -p 5435:5432 --name postgres-3 --network=local --network-alias=postgres livingdocs/postgres:14.0 standby -d $DB_URL
75+
docker run -d -p 5434:5432 --name postgres-2 --network=local --network-alias=postgres livingdocs/postgres:14.1 standby -d $DB_URL
76+
docker run -d -p 5435:5432 --name postgres-3 --network=local --network-alias=postgres livingdocs/postgres:14.1 standby -d $DB_URL
7777

7878
# Test the replication
7979
docker exec postgres-1 psql -c "CREATE TABLE hello (value text); INSERT INTO hello(value) VALUES('hello');"

0 commit comments

Comments
 (0)