Docker: Changing database credentials
When your Docker container uses /opt
to store the policy database on a separate volume, you can change the database credentials.
About this task
Given that you are changing the credentials, you already have a Docker container running with a mounted volume.
Steps
-
Stop the Docker container.
-
Start the Docker container. In the
docker run
command, specify the desired following environment variables using the--env
command-line option:-
--dbAdminUsername
-
--dbAdminPassword
-
--dbAppUsername
-
--dbAppPassword
Also specify
-p
,-d
,--env-file
,--volumes-from
, and--env PING_H2_FILE
. -
Example
For example, if you have a container named pap
with a mounted volume as shown in the example in Deploying PingAuthorize Policy Editor using Docker, the following command changes the credentials for the admin and application accounts from their default values to admin
/ Passw0rd
and app
/ S3cret
, respectively.
For proper communication between containers, create a Docker network using a command such as |
docker run --network=<network_name> -p 443:1443 -d \
--env-file ~/.pingidentity/config \
--volumes-from pap \
--env PING_DB_ADMIN_USERNAME=admin \
--env PING_DB_ADMIN_PASSWORD=Passw0rd \
--env PING_DB_APP_USERNAME=app \
--env PING_DB_APP_PASSWORD=S3cret \
--env PING_H2_FILE=/opt/out/Symphonic \
pingidentity/{PAP_CONTAINER_NAME}:<TAG>
The Docker image <TAG> used in the example is only a placeholder. For actual tag values, see Docker Hub (https://hub.docker.com/r/pingidentity/pingauthorize).