Skip to content

Commit 0220ef6

Browse files
committed
chore: change mount path to work with postgres:18
Signed-off-by: David Karlsson <[email protected]>
1 parent 0e92efc commit 0220ef6

File tree

27 files changed

+72
-72
lines changed

27 files changed

+72
-72
lines changed

content/get-started/docker-concepts/running-containers/overriding-container-defaults.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ Sometimes, you might need to override the default commands (`CMD`) or entry poin
152152
```yaml
153153
services:
154154
postgres:
155-
image: postgres
155+
image: postgres:18
156156
entrypoint: ["docker-entrypoint.sh", "postgres"]
157157
command: ["-h", "localhost", "-p", "5432"]
158158
environment:

content/get-started/docker-concepts/running-containers/persisting-container-data.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Volumes have their own lifecycle beyond that of containers and can grow quite la
5353

5454
## Try it out
5555

56-
In this guide, youll practice creating and using volumes to persist data created by a Postgres container. When the database runs, it stores files into the `/var/lib/postgresql/data` directory. By attaching the volume here, you will be able to restart the container multiple times while keeping the data.
56+
In this guide, you'll practice creating and using volumes to persist data created by a Postgres container. When the database runs, it stores files into the `/var/lib/postgresql` directory. By attaching the volume here, you will be able to restart the container multiple times while keeping the data.
5757

5858
### Use volumes
5959

@@ -62,7 +62,7 @@ In this guide, you’ll practice creating and using volumes to persist data crea
6262
2. Start a container using the [Postgres image](https://hub.docker.com/_/postgres) with the following command:
6363

6464
```console
65-
$ docker run --name=db -e POSTGRES_PASSWORD=secret -d -v postgres_data:/var/lib/postgresql/data postgres
65+
$ docker run --name=db -e POSTGRES_PASSWORD=secret -d -v postgres_data:/var/lib/postgresql postgres:18
6666
```
6767

6868
This will start the database in the background, configure it with a password, and attach a volume to the directory PostgreSQL will persist the database files.
@@ -115,7 +115,7 @@ In this guide, you’ll practice creating and using volumes to persist data crea
115115
8. Start a new container by running the following command, attaching the same volume with the persisted data:
116116

117117
```console
118-
$ docker run --name=new-db -d -v postgres_data:/var/lib/postgresql/data postgres
118+
$ docker run --name=new-db -d -v postgres_data:/var/lib/postgresql postgres:18
119119
```
120120

121121
You might have noticed that the `POSTGRES_PASSWORD` environment variable has been omitted. That’s because that variable is only used when bootstrapping a new database.

content/guides/dotnet/deploy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ spec:
9696
value: example
9797
- name: POSTGRES_PASSWORD
9898
value: example
99-
image: postgres
99+
image: postgres:18
100100
name: db
101101
ports:
102102
- containerPort: 5432

content/guides/dotnet/develop.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,13 @@ services:
9797
db:
9898
condition: service_healthy
9999
db:
100-
image: postgres
100+
image: postgres:18
101101
restart: always
102102
user: postgres
103103
secrets:
104104
- db-password
105105
volumes:
106-
- db-data:/var/lib/postgresql/data
106+
- db-data:/var/lib/postgresql
107107
environment:
108108
- POSTGRES_DB=example
109109
- POSTGRES_PASSWORD_FILE=/run/secrets/db-password
@@ -250,13 +250,13 @@ services:
250250
- action: rebuild
251251
path: .
252252
db:
253-
image: postgres
253+
image: postgres:18
254254
restart: always
255255
user: postgres
256256
secrets:
257257
- db-password
258258
volumes:
259-
- db-data:/var/lib/postgresql/data
259+
- db-data:/var/lib/postgresql
260260
environment:
261261
- POSTGRES_DB=example
262262
- POSTGRES_PASSWORD_FILE=/run/secrets/db-password
@@ -355,13 +355,13 @@ services:
355355
environment:
356356
- ASPNETCORE_ENVIRONMENT=Development
357357
db:
358-
image: postgres
358+
image: postgres:18
359359
restart: always
360360
user: postgres
361361
secrets:
362362
- db-password
363363
volumes:
364-
- db-data:/var/lib/postgresql/data
364+
- db-data:/var/lib/postgresql
365365
environment:
366366
- POSTGRES_DB=example
367367
- POSTGRES_PASSWORD_FILE=/run/secrets/db-password

content/guides/frameworks/laravel/development-setup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,15 +285,15 @@ services:
285285
- laravel-development
286286

287287
postgres:
288-
image: postgres:16
288+
image: postgres:18
289289
ports:
290290
- "${POSTGRES_PORT:-5432}:5432"
291291
environment:
292292
- POSTGRES_DB=app
293293
- POSTGRES_USER=laravel
294294
- POSTGRES_PASSWORD=secret
295295
volumes:
296-
- postgres-data-development:/var/lib/postgresql/data
296+
- postgres-data-development:/var/lib/postgresql
297297
networks:
298298
- laravel-development
299299

content/guides/frameworks/laravel/production-setup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ services:
371371
- laravel
372372

373373
postgres:
374-
image: postgres:16
374+
image: postgres:18
375375
restart: unless-stopped
376376
user: postgres
377377
ports:
@@ -381,7 +381,7 @@ services:
381381
- POSTGRES_USER=${POSTGRES_USERNAME}
382382
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
383383
volumes:
384-
- postgres-data-production:/var/lib/postgresql/data
384+
- postgres-data-production:/var/lib/postgresql
385385
networks:
386386
- laravel-production
387387
# Health check for PostgreSQL

content/guides/genai-claude-code-mcp/claude-code-mcp-guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,13 @@ services:
227227
- app-net
228228

229229
db:
230-
image: postgres:<tag>
230+
image: postgres:18
231231
environment:
232232
POSTGRES_USER: example
233233
POSTGRES_PASSWORD: example
234234
POSTGRES_DB: appdb
235235
volumes:
236-
- db-data:/var/lib/postgresql/data
236+
- db-data:/var/lib/postgresql
237237
ports:
238238
- "5432:5432"
239239
networks:

content/guides/golang/deploy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ spec:
109109
value: whatever
110110
- name: POSTGRES_USER
111111
value: postgres
112-
image: postgres
112+
image: postgres:18
113113
name: db
114114
ports:
115115
- containerPort: 5432

content/guides/java/containerize.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,13 @@ services:
209209
# db:
210210
# condition: service_healthy
211211
# db:
212-
# image: postgres
212+
# image: postgres:18
213213
# restart: always
214214
# user: postgres
215215
# secrets:
216216
# - db-password
217217
# volumes:
218-
# - db-data:/var/lib/postgresql/data
218+
# - db-data:/var/lib/postgresql
219219
# environment:
220220
# - POSTGRES_DB=example
221221
# - POSTGRES_PASSWORD_FILE=/run/secrets/db-password

content/guides/java/develop.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ services:
6262
environment:
6363
- POSTGRES_URL=jdbc:postgresql://db:5432/petclinic
6464
db:
65-
image: postgres
65+
image: postgres:18
6666
restart: always
6767
volumes:
68-
- db-data:/var/lib/postgresql/data
68+
- db-data:/var/lib/postgresql
6969
environment:
7070
- POSTGRES_DB=petclinic
7171
- POSTGRES_USER=petclinic
@@ -193,10 +193,10 @@ services:
193193
environment:
194194
- POSTGRES_URL=jdbc:postgresql://db:5432/petclinic
195195
db:
196-
image: postgres
196+
image: postgres:18
197197
restart: always
198198
volumes:
199-
- db-data:/var/lib/postgresql/data
199+
- db-data:/var/lib/postgresql
200200
environment:
201201
- POSTGRES_DB=petclinic
202202
- POSTGRES_USER=petclinic
@@ -345,10 +345,10 @@ services:
345345
- action: rebuild
346346
path: .
347347
db:
348-
image: postgres
348+
image: postgres:18
349349
restart: always
350350
volumes:
351-
- db-data:/var/lib/postgresql/data
351+
- db-data:/var/lib/postgresql
352352
environment:
353353
- POSTGRES_DB=petclinic
354354
- POSTGRES_USER=petclinic

0 commit comments

Comments
 (0)