You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the network section, container for Postgres should start up without any environment variables.
$ docker run --rm -d --name widgetdb --network skynet -p 5432 postgres
7f0248e3c0f4f03159ef966fd9767a4c7e3412801f8b0445cebb933d1e84e020
$ docker run --rm -d --name gadgetdb --network skynet -p 5432 postgres
8dc66701837c695728abb9046db71924112a9b8f2f1e096094ab5b5d631e2f73
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8dc66701837c postgres "docker-entrypoint..." 11 seconds ago Up 10 seconds 0.0.0.0:32769->5432/tcp gadgetdb
7f0248e3c0f4 postgres "docker-entrypoint..." 40 seconds ago Up 39 seconds 0.0.0.0:32768->5432/tcp widgetdb
$
Current Behavior
The environment variable POSTGRES_PASSWORD must be specified at startup.
$ docker run --rm -d --name widgetdb --network skynet -p 5432 postgres
4f20eef0f61b876170ad92a1234370e251b8c3e508fc63eca6058240555e5930
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4f20eef0f61b postgres "docker-entrypoint.s…" 3 seconds ago Exited (1) 1 second ago gadgetdb
$ docker logs widgetdb
Error: Database is uninitialized and superuser password is not specified.
You must specify POSTGRES_PASSWORD to a non-empty value for the
superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run".
You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all
connections without a password. This is *not* recommended.
See PostgreSQL documentation about "trust":
https://www.postgresql.org/docs/current/auth-trust.html
$
Possible Solution
$ docker run --rm -d -e POSTGRES_PASSWORD=strongpass --name widgetdb --network skynet -p 5432 postgres
f776a6e9c78d0103e7a0afd1ba16394b8b51a016fe7fd1a5b586de6304e383fa
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f776a6e9c78d postgres "docker-entrypoint.s…" 35 seconds ago Up 33 seconds 0.0.0.0:32771->5432/tcp widgetdb
$
The text was updated successfully, but these errors were encountered:
Expected Behavior
In the network section, container for Postgres should start up without any environment variables.
Current Behavior
The environment variable POSTGRES_PASSWORD must be specified at startup.
Possible Solution
The text was updated successfully, but these errors were encountered: