Skip to content

Commit 2873b7c

Browse files
committed
feat: Upgrade to postgres 14.2
1 parent d687d7c commit 2873b7c

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ 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.1-1.pgdg110+1" && \
28+
apt-get install -y --no-install-recommends "postgresql-14=14.2-1.pgdg110+1" && \
2929
echo 'Install pg_auto_failover' && \
3030
sh -c 'curl https://install.citusdata.com/community/deb.sh | bash' && \
3131
apt-get install -y postgresql-14-auto-failover-1.6.3 && \

Dockerfile.upgrade

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM livingdocs/postgres:14.1
1+
FROM livingdocs/postgres:14.2
22
USER root
33
RUN set -e \
44
export DEBIAN_FRONTEND=noninteractive && \

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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)
1+
# [Postgres 14.2](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.1
16+
docker run -d --name postgres -p 5432:5432 -v postgres:/var/lib/postgresql -e POSTGRES_PASSWORD=somepassword livingdocs/postgres:14.2
1717
```
1818

1919
## Upgrade an existing postgres container
@@ -24,29 +24,29 @@ 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.1-upgrade
27+
docker run --rm -v postgres:/var/lib/postgresql livingdocs/postgres:14.2-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.1
30+
docker run -d --name postgres -p 5432:5432 -v postgres:/var/lib/postgresql livingdocs/postgres:14.2
3131
```
3232

3333
## To build this image manually
3434

3535
```bash
36-
docker build -t livingdocs/postgres:14.1 .
36+
docker build -t livingdocs/postgres:14.2 .
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.1 --push .
40-
docker buildx build --platform linux/amd64,linux/arm64 -t livingdocs/postgres:14.1-upgrade --push -f Dockerfile.upgrade .
39+
docker buildx build --platform linux/amd64,linux/arm64 -t livingdocs/postgres:14.2 --push .
40+
docker buildx build --platform linux/amd64,linux/arm64 -t livingdocs/postgres:14.2-upgrade --push -f Dockerfile.upgrade .
4141
```
4242

4343
## Set up streaming replication
4444

4545
### Simple setup
4646
```bash
4747
# Create the containers
48-
docker run -d -p 5433:5432 --name postgres-1 livingdocs/postgres:14.1
49-
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"
48+
docker run -d -p 5433:5432 --name postgres-1 livingdocs/postgres:14.2
49+
docker run -d -p 5434:5432 --name postgres-2 livingdocs/postgres:14.2 standby -d "host=host.docker.internal port=5433 user=postgres target_session_attrs=read-write"
5050

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

6666
# First create the database primary
67-
docker run -d -p 5433:5432 --name postgres-1 --network=local --network-alias=postgres -e POSTGRES_HOST_AUTH_METHOD=md5 livingdocs/postgres:14.1
67+
docker run -d -p 5433:5432 --name postgres-1 --network=local --network-alias=postgres -e POSTGRES_HOST_AUTH_METHOD=md5 livingdocs/postgres:14.2
6868

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

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

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

0 commit comments

Comments
 (0)