About this task
Use the following steps to execute multiple RunUMTool commands by using the
STARTUP_COMMAND
environment variable when you run a container.
By default, STARTUP_COMMAND
supports executing only a single RunUMTool
command.
To execute multiple RunUMTool commands when running a
container
Procedure
-
In a new folder, create a shell script file that contains the RunUMTool commands that
you want to run when starting the container.
-
In the same folder, create a Dockerfile that has the following content:
FROM cp.icr.io/cp/webmethods/universalmessaging/universalmessaging-server:11.1
COPY --chown=<user>:<group_ID> <shell_script_file> /opt/softwareag
RUN chmod u+x /opt/softwareag/<shell_script_file>
Important: The new folder should contain only the shell script file and the
Dockerfile you created.
-
Open a command prompt in the location of the Dockerfile and build a container
image:
docker build -t <image_name> .
-
Run a container from the new image and specify the shell script file as a value of
STARTUP_COMMAND
:
docker run -d -e STARTUP_COMMAND=<shell_script_file> -p 9000:9000
--name <container_name> <image_name>