在centos / postgresql-94-centos7 Docker Image中配置postgres

问题描述 投票:0回答:1

我想在一个继承wal_level的Dockerfile中配置一些postgres.conf参数(archive_modearchive_timeoutFROM centos/postgresql-94-centos7:9.4

这样做的最佳方式是什么?

docker centos postgresql-9.4
1个回答
0
投票

我最终使用了一个docker-compose文件,它在主机上安装了pg data dir

    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

并在主机上有一个脚本来编辑该文件并在之后运行docker-compose up。 (这取决于您的设置,如果您没有使用PoC,而是使用更永久的东西,则在创建docker镜像时编辑文件是有意义的)

© www.soinside.com 2019 - 2024. All rights reserved.