How to customize the configuration file of the official PostgreSQL Docker image?

后端 未结 11 2070
时光取名叫无心
时光取名叫无心 2020-11-29 16:11

I\'m using the official Postgres Docker image trying to customize its configuration. For this purpose, I use the command sed to change max_connections

11条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-29 16:25

    This works for me:

    FROM postgres:9.6
    USER postgres
    
    # Copy postgres config file into container
    COPY postgresql.conf /etc/postgresql
    
    # Override default postgres config file
    CMD ["postgres", "-c", "config_file=/etc/postgresql/postgresql.conf"]
    

提交回复
热议问题