Openam bootstrapping inside Docker

This topic has 6 replies, 4 voices, and was last updated 3 years, 9 months ago by Azharuddin.

  • Author
    Posts
  • #15201
     akrepon
    Participant

    Hi,

    I have pulled the openam docker project from https://stash.forgerock.org/projects/DOCKER/repos/docker/browse. I’ve managed to start the container. This asks me the installation configuration upon visiting the openam link for the first time.

    But I want to configure a bootstrapping file as explained under the folder docker/openem/openam/README.md.
    In the folder there’s also another file called boot.json. It’s explained to put this file in the /root/openam/ folder in the container which is exactly what I did by adding this in the DockerFile. Unfortunately nothing changes and I still get the configuration page.

    I’ve found no where in the openam documentation how to configure this boot.json file. It’s not explained any where. Is there any other way to configure the openam at the initial bootstrapping so that everything is configured?

    I am using the Openam 13 currently. Maybe it’s something not supported in this version?

    Thanks in advance

    #15218
     Peter Major
    Moderator

    @warren-strangeforgerock-com may be able to help you. The docker images aren’t part of the supported products currently.

    #15219
     Peter Major
    Moderator

    @warren-strangeforgerock-com may be able to help you. The docker images aren’t part of the supported products currently.

    #15220
     Warren Strange
    Participant

    The boot.json file is brand new for OpenAM 14 and will not work on previous versions.

    That dockerfile is designed for AM 14, where a boot.json can be provided or mounted at runtime.

    OpenAM always needs to be configured first (AM 14 does not change that).

    For AM 13, a possible strategy is to mount an external volume on /root/openam. This volume can be reattached on the docker container when OpenAM restarts.

    #15226
     akrepon
    Participant

    Hi Warren,

    Thanks for the answers. I’ve successfully put openam inside a docker container. But even though I’ve mounted the /root/openam inside the container, the OpenAM container starts always with the configuration startup screen. Is there something I’ve forgotten to do?

    Here’s the exact flow I’ve tried:

    1) Put OpenAM inside a docker container.
    2) Start the container.
    3) Go to the OpenAM installation/configuration page.
    4) Configure everything and finalize installation.
    5) Bash into the docker container and copy the newly created/configured /root/openam into the local host.
    6) Stop the docker container.
    7) Add the copied /root/openam from the container to the DockerFile.
    8) Build the image.
    9) Start the container.
    10) Go to the OpenAM start page.
    11) The installation page shows up again -> Here’s the part I don’t understand.

    So is there any other extra configuration outside of /root/openam that OpenAM checks in order to verify if OpenAM is properly installed?

    Thanks in advance,

    Yasin

    #15232
     Warren Strange
    Participant

    Check the ~/.openamcfg directory that points to /root/openam. Maybe you are overwriting it?

    If you already have openam running OK in docker on initial boot, one option is to just save that running container as a new docker image.

    #23500
     Azharuddin
    Participant

    On the first startup of the container a random password will be generated for the database if not provided. You can find this password in the output line:

    ORACLE PASSWORD FOR SYS, SYSTEM AND PDBADMIN:
    The password for those accounts can be changed via the docker exec command. Note, the container has to be running:

    docker exec <container name> ./setPassword.sh <your password>
    Running Oracle Database Express Edition in a Docker container
    To run your Oracle Database Express Edition Docker image use the docker run command as follows:

    docker run –name <container name> \
    –shm-size=1g \
    -p 1521:1521 -p 8080:8080 \
    -e ORACLE_PWD=<your database passwords> \
    -v [<host mount point>:]/u01/app/oracle/oradata \
    oracle/database:11.2.0.2-xe

    Parameters:
    –name: The name of the container (default: auto generated)
    –shm-size: Amount of Linux shared memory
    -p: The port mapping of the host port to the container port.
    Two ports are exposed: 1521 (Oracle Listener), 8080 (APEX)
    -e ORACLE_PWD: The Oracle Database SYS, SYSTEM and PDB_ADMIN password (default: auto generated)

    -v /u01/app/oracle/oradata
    The data volume to use for the database.
    Has to be writable by the Unix “oracle” (uid: 54321) user inside the container!
    If omitted the database will not be persisted over container recreation.
    -v /u01/app/oracle/scripts/startup | /docker-entrypoint-initdb.d
    Optional: A volume with custom scripts to be run after database startup.
    For further details see the “Running scripts after setup and on startup” section below.
    -v /u01/app/oracle/scripts/setup | /docker-entrypoint-initdb.d
    Optional: A volume with custom scripts to be run after database startup.
    For further details see the “Running scripts after setup and on startup” section below.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

©2022 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?