Skip to content

Using Docker and PostgreSQL: How can I set administrator password in official postgresql image? (But securely, not a living environment variable) #565

@kopax

Description

@kopax

I am using the official PostgreSQL Docker imnage (postgresql:11-alpine) from Docker HUB registry.

I want to create the PostgreSQL administrator password in a safe way.

Currently, this image offer to set it using environment variable:

enter image description here

Using environment variables is not really safe as it can be seen after initialization by anyone having access to the host.

There is another option for setting the password but that only work in docker swarm.

In this image, how can I set the PostgreSQL administrator, securely, and without manual step during initial deployment?Using Docker and PostgreSQL: How can I set administrator password in official postgresql image? (But securely, not a living environment variable)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions