From 773ed2d2f7c2d9cd0c37b8dd544054dd922ffee3 Mon Sep 17 00:00:00 2001 From: "Yu, Lexun" Date: Fri, 17 Oct 2025 22:33:07 +0800 Subject: [PATCH] fix pgdata volume mount command to expose port 5432 --- 04-using-3rd-party-containers/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/04-using-3rd-party-containers/README.md b/04-using-3rd-party-containers/README.md index c9451d29..545ab436 100644 --- a/04-using-3rd-party-containers/README.md +++ b/04-using-3rd-party-containers/README.md @@ -198,7 +198,7 @@ cat /var/lib/docker/volumes/my-volume/_data/hello.txt # Woohoo! we found our dat This approach can then be used to mount a volume at the known path where a program persists its data: ```bash # Create a container from the postgres container image and mount its known storage path into a volume named pgdata -docker run -it --rm -v pgdata:/var/lib/postgresql/data -e POSTGRES_PASSWORD=foobarbaz postgres:15.1-alpine +docker run -it --rm -p 5432:5432 -v pgdata:/var/lib/postgresql/data -e POSTGRES_PASSWORD=foobarbaz postgres:15.1-alpine ``` #### ii. Bind Mounts