Description
I don't like setting the password with an environment variable because environment variables can be viewed with 'docker inspect'. Can you provide a way to pass the password by mounting a file to the container and read the password from that file?
For example something like this:
$cat secret
export POSTGRES_PASSWORD=mysecretpostgrespassword
$ sudo docker run -v $(pwd):/tmp --name some-postgres -d postgres
and then in docker-entrypoint.sh read/source the password from /tmp/secret .
Thank you
PS:
I tried to do something like this:
but this resulted in:
/bin/bash: source /tmp/secret >> docker-entrypoint.sh: No such file or directory