I would like to configure some postgres.conf parameters (wal_level
, archive_mode
, archive_timeout
) in a Dockerfile that inherits FROM centos/postgresql-94-centos7:9.4
What is the best way of doing this?
I would like to configure some postgres.conf parameters (wal_level
, archive_mode
, archive_timeout
) in a Dockerfile that inherits FROM centos/postgresql-94-centos7:9.4
What is the best way of doing this?
I ended up using a docker-compose file that mounts the pg data dir on host
volumes:
# See end of "Environment variables and volumes" section on
# https://hub.docker.com/r/centos/postgresql-94-centos7
- /path/on/host:/var/lib/pgsql/data
and have a script on host that edits the file and runs docker-compose up
afterwards.
(This depends on your setup, if you're not working on a PoC but on something more permanent, it makes sense to edit the file when creating the docker image)