Commands
Docker
Pull Image
https://hub.docker.com/_/postgres/tags
docker pull postgres:18.0-bookworm
Run Container
Get default config.
docker run -i --rm \
postgres:18.0-bookworm \
cat /usr/share/postgresql/postgresql.conf.sample \
> postgres.conf
docker run -d \
--name postgres-18-0 \
-p 192.168.x.x:5432:5432 \
-v "$PWD/postgres.conf":/etc/postgresql/postgresql.conf \
-v "$PWD/data":/var/lib/postgresql \
-e POSTGRES_PASSWORD=mysecretpassword \
postgres:18.0-bookworm \
-c 'config_file=/etc/postgresql/postgresql.conf'
No comments to display
No comments to display