ForgeOps

Base Docker images

ForgeRock provides nine Docker images for deploying the ForgeRock Identity Platform:

  • Six unsupported, evaluation-only base images:

    • amster

    • am-base

    • am-config-upgrader

    • ds

    • idm

    • ig

  • Three supported base images that implement the platform’s user interface elements:

    • platform-admin-ui

    • platform-enduser-ui

    • platform-login-ui

All of the Docker images are publicly available in ForgeRock’s Docker registry, gcr.io/forgerock-io.

Which Docker images do I deploy?

  • I am a developer using the CDK.

    • UI elements. Deploy the supported images from ForgeRock.

    • Other platform elements. Either deploy:

      • The evaluation-only images from ForgeRock.

      • Docker images that are based on the evaluation-only images, but contain a customized configuration profile.

  • I am doing a proof-of-concept CDM deployment.

    • UI elements. Deploy the supported images from ForgeRock.

    • Other platform elements. Either deploy:

      • The evaluation-only images from ForgeRock.

      • Docker images that are based on the evaluation-only images, but contain a customized configuration profile.

  • I am deploying the platform in production.

    • UI elements. Deploy the supported images from ForgeRock.

    • Other platform elements. Deploy Docker images that are based on your own base images, but contain a customized configuration profile. ForgeRock does not support production deployments with Docker images based on the evaluation-only images.

Your own base Docker images

Perform the following steps to build base images for the seven unsupported, evaluation-only Docker images. After you’ve built your own base images, push them to your Docker registry:

  1. Download the latest versions of the AM, Amster, IDM, and DS .zip files from the ForgeRock Download Center. Optionally, you can also download the latest version of the IG .zip file.

  2. Build the base image for Amster. This image must be available in order to build the base image for AM in the next step:

    1. Make a directory named amster.

    2. Unzip the Amster .zip file into the new amster directory.

    3. Change to the samples/docker directory in the expanded .zip file output.

    4. Run the setup.sh script:

      $ ./setup.sh
      
      + mkdir -p build
      + find ../.. '!' -name .. '!' -name samples '!' -name docker -maxdepth 1 -exec cp -R '{}' build/ ';'
      + cp ../../docker/amster-install.sh ../../docker/docker-entrypoint.sh ../../docker/export.sh ../../docker/tar.sh build
    5. Build the amster Docker image:

      $ docker build --tag amster:7.2.0 .
      
       ⇒ [internal] load build definition from Dockerfile                                                                                          0.0s
       ⇒ ⇒ transferring dockerfile: 1.67kB                                                                                                        0.0s
       ⇒ [internal] load .dockerignore                                                                                                             0.0s
       ⇒ ⇒ transferring context: 2B                                                                                                               0.0s
       ⇒ [internal] load metadata for gcr.io/forgerock-io/java-11:latest                                                                           1.1s
       ⇒ [1/8] FROM gcr.io/forgerock-io/java-11:latest@. . .
      latest: Pulling from forgerock-io/java-11
      . . .
       ⇒ exporting to image                                                                                                                                              1.2s
       ⇒ ⇒ exporting layers                                                                                                                                             1.2s
       ⇒ ⇒ writing image sha256:bc474cb6c189e253278f831f178b8d51f63a958a6526c0189fdf122ddf8f9e52                                                                        0.0s
       ⇒ ⇒ naming to docker.io/library/amster:7.2.0
  3. Build the base image for AM:

    1. Unzip the AM .zip file.

    2. Change to the openam/samples/docker directory in the expanded .zip file output.

    3. Run the setup.sh script:

      $ chmod u+x setup.sh
      $ ./setup.sh
    4. Change to the images/am-empty directory.

    5. Build the am-empty Docker image:

      $ docker build --tag am-empty:7.2.0 .
      
       ⇒ [internal] load build definition from Dockerfile                                                                                          0.0s
       ⇒ ⇒ transferring dockerfile: 3.60kB                                                                                                        0.0s
       ⇒ [internal] load .dockerignore                                                                                                             0.0s
       ⇒ ⇒ transferring context: 2B                                                                                                               0.0s
       ⇒ [internal] load metadata for docker.io/library/tomcat:9-jdk11-openjdk-slim-bullseye                                                       1.8s
       ⇒ [internal] load build context                                                                                                             5.6s
       ⇒ ⇒ transferring context: 231.59MB                                                                                                         5.6s
       ⇒ [base  1/14] FROM docker.io/library/tomcat:9-jdk11-openjdk-slim-bullseye@. . .
      . . .
       ⇒ exporting to image                                                                                                                        1.7s
       ⇒ ⇒ exporting layers                                                                                                                       1.6s
       ⇒ ⇒ writing image sha256:9784a73aabaca39ac207dfbda942f5acfff6820c6044809a1cd386e1d36018c9                                                  0.0s
       ⇒ ⇒ naming to docker.io/library/am-empty:7.2.0
    6. Change to the ../am-base directory.

    7. Build the am-base Docker image:

      $ docker build --build-arg docker_tag=7.2.0 --tag my-registry/am-base:7.2.0 .
      
       ⇒ [internal] load build definition from Dockerfile                                                                                          0.0s
       ⇒ ⇒ transferring dockerfile: 2.72kB                                                                                                        0.0s
       ⇒ [internal] load .dockerignore                                                                                                             0.0s
       ⇒ ⇒ transferring context: 2B                                                                                                               0.0s
       ⇒ [internal] load metadata for my-registry/library/amster:7.2.0                                                                              0.0s
       ⇒ [internal] load metadata for my-registry/library/am-empty:7.2.0                                                                            0.0s
       ⇒ [amster 1/1] FROM my-registry/library/amster:7.2.0                                                                                          0.2s
       ⇒ [internal] load build context                                                                                                             0.8s
       ⇒ ⇒ transferring context: 36.86MB                                                                                                          0.7s
       ⇒ [generator  1/15] FROM my-registry/library/am-empty:7.2.0                                                                                   0.4s
       ⇒ [generator  2/15] RUN apt-get update -y &&     apt-get install -y git jq unzip
      . . .
       ⇒ [am-base 8/8] COPY --chown=forgerock:root scripts/import-pem-certs.sh /home/forgerock/                                                    0.0s
       ⇒ exporting to image                                                                                                                        0.3s
       ⇒ ⇒ exporting layers                                                                                                                       0.2s
       ⇒ ⇒ writing image sha256:0c3a2144f22a930b899fc1c3ffab630e4a51e0ee26c1cdea480ef9cb735ac7b9                                                  0.0s
       ⇒ ⇒ naming to docker.io/my-registry/am-base:7.2.0
  4. Now that the AM image is built, tag the base image for Amster in advance of pushing it to your private repository:

    $ docker tag amster:7.2.0 my-registry/amster:7.2.0
  5. Build the am-config-upgrader base image:

    1. Change to the openam directory in the expanded AM .zip file output.

    2. Unzip the Config-Upgrader-7.2.0.zip file.

    3. Change to the amupgrade/samples/docker directory in the expanded Config-Upgrader-7.2.0.zip file output.

    4. Run the setup.sh script:

      $ ./setup.sh
      
      + mkdir -p build/amupgrade
      + find ../.. '!' -name .. '!' -name samples '!' -name docker -maxdepth 1 -exec cp -R '{}' build/amupgrade ';'
      + cp ../../docker/docker-entrypoint.sh .
    5. Create the base am-config-upgrader image:

      $ docker build . --tag my-registry/am-config-upgrader:7.2.0
      
       ⇒ [internal] load build definition from Dockerfile                                                                                          0.0s
       ⇒ ⇒ transferring dockerfile: 1.14kB                                                                                                        0.0s
       ⇒ [internal] load .dockerignore                                                                                                             0.0s
       ⇒ ⇒ transferring context: 2B                                                                                                               0.0s
       ⇒ [internal] load metadata for gcr.io/forgerock-io/java-11:latest                                                                           0.2s
       ⇒ [internal] load build context                                                                                                             0.4s
       ⇒ ⇒ transferring context: 15.44MB                                                                                                          0.4s
       ⇒ CACHED [1/4] FROM gcr.io/forgerock-io/java-11:latest@sha256:d4d6335c6a2f1657cb19a0b28439feefd0a9061fe160cb3fc47c226976bc7e4e              0.0s
       ⇒ [2/4] RUN apt-get update &&     apt-get upgrade -y                                                                                        4.3s
       ⇒ [3/4] COPY --chown=forgerock:root docker-entrypoint.sh /home/forgerock/                                                                   0.0s
       ⇒ [4/4] COPY build/ /home/forgerock/                                                                                                        0.1s
       ⇒ exporting to image                                                                                                                        0.1s
       ⇒ ⇒ exporting layers                                                                                                                       0.1s
       ⇒ ⇒ writing image sha256:c06eb12006468f50eb79621a3e945ce52dec0775c46879d2ad4d07296fd5b818                                                  0.0s
       ⇒ ⇒ naming to docker.io/my-registry/am-config-upgrader:7.2.0
  6. Build the base image for DS:

    1. Unzip the DS .zip file.

    2. Change to the opendj directory in the expanded .zip file output.

    3. Run the samples/docker/setup.sh script to create a server:

      $ ./samples/docker/setup.sh
      
      + rm -f template/config/tools.properties
      + cp -r samples/docker/Dockerfile samples/docker/README.md . . .
      + rm -rf — README README.md bat '*.zip' opendj_logo.png setup.bat upgrade.bat setup.sh
      + ./setup --serverId docker --hostname localhost
      . . .
      
      Validating parameters…​.. Done
      Configuring certificates…​…​. Done
      . . .
    4. Build the ds base image:

      $ docker build --tag my-registry/ds-empty:7.2.0 .
      
       ⇒ [internal] load build definition from Dockerfile                                                                                          0.0s
       ⇒ ⇒ transferring dockerfile: 1.23kB                                                                                                        0.0s
       ⇒ [internal] load .dockerignore                                                                                                             0.0s
       ⇒ ⇒ transferring context: 2B                                                                                                               0.0s
       ⇒ [internal] load metadata for gcr.io/forgerock-io/java-11:latest                                                                           1.7s
       ⇒ [internal] load build context                                                                                                             1.2s
       ⇒ ⇒ transferring context: 61.00MB                                                                                                          1.2s
       ⇒ CACHED [1/4] FROM gcr.io/forgerock-io/java-11:latest@. . .
      . . .
       ⇒ [4/4] WORKDIR /opt/opendj                                                                                                                 0.0s
       ⇒ exporting to image                                                                                                                        0.4s
       ⇒ ⇒ exporting layers                                                                                                                       0.3s
       ⇒ ⇒ writing image sha256:713ac3418d5afd04a0f71aa8f6e57be0a9688301a2c1a60ae74978b9eb107e0f                                                  0.0s
       ⇒ ⇒ naming to docker.io/my-registry/ds:7.2.0
  7. Build the base image for IDM:

    1. Unzip the IDM .zip file.

    2. Change to the openidm directory in the expanded .zip file output.

    3. Build the idm base image:

      $ docker build . --file bin/Custom.Dockerfile --tag my-registry/idm:7.2.0
      
       ⇒ [internal] load build definition from Custom.Dockerfile                                                                                   0.0s
       ⇒ ⇒ transferring dockerfile: 648B                                                                                                          0.0s
       ⇒ [internal] load .dockerignore                                                                                                             0.0s
       ⇒ ⇒ transferring context: 2B                                                                                                               0.0s
       ⇒ [internal] load metadata for gcr.io/forgerock-io/java-11:latest                                                                           0.3s
       ⇒ CACHED [1/4] FROM gcr.io/forgerock-io/java-11:latest@. . .
        ⇒ [internal] load build context                                                                                                             9.7s
       ⇒ ⇒ transferring context: 322.62MB                                                                                                         9.7s
       ⇒ [2/4] RUN apt-get update &&     apt-get install -y ttf-dejavu                                                                            10.3s
       ⇒ [3/4] COPY --chown=forgerock:root . /opt/openidm                                                                                          2.3s
       ⇒ [4/4] WORKDIR /opt/openidm                                                                                                                0.0s
       ⇒ exporting to image                                                                                                                        3.3s
       ⇒ ⇒ exporting layers                                                                                                                       3.3s
       ⇒ ⇒ writing image sha256:95509d5206f92fd6cd74586b0f9475e837dcf56b7413852b14c788c27e345788                                                  0.0s
       ⇒ ⇒ naming to docker.io/my-registry/idm:7.2.0
  8. (Optional) Build the base image for IG:

    1. Unzip the IG .zip file.

    2. Change to the identity-gateway directory in the expanded .zip file output.

    3. Build the ig base image:

      $ docker build . --file docker/Dockerfile --tag my-registry/ig:7.2.0
      
       ⇒ [internal] load build definition from Dockerfile                                                                                          0.0s
       ⇒ ⇒ transferring dockerfile: 1.43kB                                                                                                        0.0s
       ⇒ [internal] load .dockerignore                                                                                                             0.0s
       ⇒ ⇒ transferring context: 2B                                                                                                               0.0s
       ⇒ [internal] load metadata for gcr.io/forgerock-io/java-11:latest                                                                           0.3s
       ⇒ [internal] load build context                                                                                                             2.2s
       ⇒ ⇒ transferring context: 113.60MB                                                                                                         2.2s
       ⇒ CACHED [1/3] FROM gcr.io/forgerock-io/java-11:latest@. . .
       ⇒ [2/3] COPY --chown=forgerock:root . /opt/ig                                                                                               0.7s
       ⇒ [3/3] RUN mkdir -p "/var/ig"     && chown -R forgerock:root "/var/ig" "/opt/ig"     && chmod -R g+rwx "/var/ig" "/opt/ig"                 0.9s
       ⇒ exporting to image                                                                                                                        0.6s
       ⇒ ⇒ exporting layers                                                                                                                       0.6s
       ⇒ ⇒ writing image sha256:77fc5e8e29c18de85116a0ec0fe62020689c81b9f9eb5d7f0c01725fb7236e63                                                  0.0s
       ⇒ ⇒ naming to docker.io/my-registry/ig:7.2.0
  9. Run the docker images command to verify that you built the base images:

    $ docker images | grep my-registry
    
    REPOSITORY                     TAG      IMAGE ID        CREATED        SIZE
    my-registry/am-base            7.2.0    552073a1c000    1 hour ago     795MB
    my-registry/am-config-upgrader 7.2.0    d115125b1c3f    1 hour ago     795MB
    my-registry/amster             7.2.0    d9e1c735f415    1 hour ago     577MB
    my-registry/ds-empty           7.2.0    ac8e8ab0fda6    1 hour ago     196MB
    my-registry/idm                7.2.0    0cc1b7f70ce6    1 hour ago     387MB
    my-registry/ig                 7.2.0    9728c30c1829    1 hour ago     249MB
  10. Push the new base Docker images to your Docker registry.

    See your registry provider documentation for detailed instructions. For most Docker registries, you run the docker login command to log in to the registry. Then, you run the docker push command to push a Docker image to the registry.

    Be sure to configure your Docker registry so that you can successfully push your Docker images. Each cloud-based Docker registry has its own specific requirements. For example, on Amazon ECR, you must create a repository for each image.

    Push the following images:

    • my-registry/am-base:7.2.0

    • my-registry/amster:7.2.0

    • my-registry/am-config-upgrader:7.2.0

    • my-registry/ds-empty:7.2.0

    • my-registry/idm:7.2.0

    If you’re deploying your own IG base image, also push the my-registry/ig:7.2.0 image.

Create Docker images for use in production

After you’ve built and pushed your own base images to your Docker registry, you’re ready to build customized Docker images that can be used in a production deployment of the ForgeRock Identity Platform. These images:

Create your production-ready Docker images, create a Kubernetes cluster to test them, and delete the cluster when you’ve finished testing the images:

  1. Clone the forgeops repository.

  2. Obtain custom configuration profiles that you want to use in your Docker images from your developer, and copy them into your forgeops repository clone:

    • Obtain the AM configuration profile from the /path/to/forgeops/docker/am/config-profiles directory.

    • Obtain the IDM configuration profile from the /path/to/forgeops/docker/idm/config-profiles directory.

    • (Optional) Obtain the IG configuration profile from the /path/to/forgeops/docker/ig/config-profiles directory.

  3. Change the first lines of Dockerfiles in the forgeops repositories to refer to your own base Docker images:

    In the forgeops repository file: Change the first line to:

    docker/am/Dockerfile

    FROM my-registry/am-base:7.2.0

    docker/amster/Dockerfile

    FROM my-registry/amster:7.2.0

    docker/ds/ds-new/Dockerfile

    FROM my-registry/ds-empty:7.2.0

    docker/idm/Dockerfile

    FROM my-registry/idm:7.2.0 [1]

    (Optional) docker/ig/Dockerfile

    FROM my-registry/ig:7.2.0

  4. If necessary, log in to your Docker registry.

  5. Build Docker images that are based on your own base images. The AM and IDM images contain your customized configuration profiles:

    $ cd /path/to/forgeops/bin
    $ ./forgeops build ds --default-repo my-registry
    $ ./forgeops build amster --default-repo my-registry
    $ ./forgeops build am --default-repo my-registry --config-profile my-profile
    $ ./forgeops build idm --default-repo my-registry --config-profile my-profile

    The forgeops build command:

    • Builds Docker images. The AM and IDM images incorporate customized configuration profiles.

    • Pushes Docker images to the registry specified in the --default-repo argument.

    • Updates the image defaulter file, which the forgeops install command uses to determine which Docker images to run.

  6. (Optional) Build and push an IG Docker image that’s based on your own base image and contains your customized configuration profile:

    $ ./forgeops build ig --config-profile my-profile --default-repo my-registry
  7. Prepare a Kubernetes cluster to test your images:

    1. Create the cluster. This example assumes that you create a cluster suitable for a small-sized CDM deployment.

    2. Deploy an ingress controller in the cluster.

    3. Create a namespace in the new cluster, and then make the new namespace the active namespace in your local Kubernetes context.

  8. Install the CDM in your cluster:

    $ ./forgeops install --small --fqdn cdm.example.com
  9. Access the AM admin UI and the IDM admin UI, and verify that your customized configuration profiles are active.

  10. Delete the Kubernetes cluster that you used to test images.

At the end of this process, the artifacts that you’ll need to deploy the ForgeRock Identity Platform in production are available:

  • Docker images for the ForgeRock Identity Platform, in your Docker registry

  • An updated image defaulter file, in your forgeops repository clone

You’ll need to copy the image defaulter file to your production deployment, so that when you run the forgeops install command, it will use the correct Docker images.

Typically, you model the image creation process in a CI/CD pipeline. Then, you run the pipeline at milestones in the development of your customized configuration profile.


1. The FROM statement originally contained idm-cdk as part of the registry name. Be sure to use idm, not idm-cdk, in the revised statement.
Copyright © 2010-2022 ForgeRock, all rights reserved.