PingAuthorize

Docker: Setting the initial database credentials

When using a Docker image, set the database credentials using UNIX environment variables. Specify the environment variables as command-line options in the docker run command.

Steps

  • In the docker run command, specify the desired following environment variables using the --env command-line option:

    • --dbAdminUsername

    • --dbAdminPassword

    • --dbAppUsername

    • --dbAppPassword

Example

This example initializes the policy database with the admin credentials admin/ Passw0rd and the application credentials app/ S3cret. Also, it uses the Ping DevOps image.

Specify a separate volume to store the policy database to perform future upgrades. See Deploying PingAuthorize Policy Editor using Docker.

For proper communication between containers, create a Docker network using a command such as docker network create --driver <network_type> <network_name>, and then connect to that network with the --network=<network_name> option.

$ docker run --network=<network_name>  \
  --env PING_DB_ADMIN_USERNAME=admin \
  --env PING_DB_ADMIN_PASSWORD=Passw0rd \
  --env PING_DB_APP_USERNAME=app \
  --env PING_DB_APP_PASSWORD=S3cret \
    pingidentity/{PAP_CONTAINER_NAME}