如何从Postgres docker镜像更改postgresql.conf

我有一个使用Docker容器部署的Rails应用程序。 我正在使用PostgreSQL作为数据库,我试图设置WAL-E来连续备份到S3存储桶。 这个设置包括对postgresql.conf文件进行一些更改。

我正在使用postgres官方图像作为基础图像,并传递postgresql.conf文件。 这是我的Dockerfile:

FROM postgres:9.4 MAINTAINER David Ham <me@example.com> RUN apt-get update -y && apt-get install -y \ git \ python-virtualenv \ python-dev \ python-pip \ libevent-dev \ pv \ lzop RUN virtualenv /opt/wale \ && . /opt/wale/bin/activate \ && pip install git+https://github.com/wal-e/wal-e COPY postgresql.conf /postgresql-wal-e/postgresql-wal-e.conf RUN chown -R postgres:postgres /postgresql-wal-e CMD ["postgres", "-c", "config-file=/postgresql-wal-e/postgresql-wal-e.conf"] 

这是正确的吗? 它似乎已经正确复制,但这是正确的方式来configurationPostgres的官方图像?