Docker Compose commands reference

You can run the ./om-compose.sh command with arguments to suit your requirements. For example, ./om-compose.sh <arguments>.
The following table lists the commands and the supported arguments to run the Docker Compose script.
Table 1. Commands and arguments to run om-compose.sh
Commands Description
./om-compose.sh setup
<optional: full_path_to_custom jar>
Sets up a containerized developer toolkit environment for the first time. Also, it deploys the customization JAR provided, though it is optional. For more information, see Setting up the containerized developer toolkit environment.
./om-compose.sh setup-upg
<optional: full_path_to_custom_jar>
Updates an existing environment with new images. Also, it deploys the customization JAR provided, though it is optional.
./om-compose.sh update-extn
<optional: full_path_to_custom_jar>
Updates an existing environment with just the customization package, without fetching new images. For more information, see Updating custom extensions in containerized developer toolkit environment.
./om-compose.sh extract-rt

Extracts runtime contents to the devtoolkit_docker/runtime directory in the host machine.

You can create a copy of your runtime on your host machine from your om-runtime Docker image. You can access the runtime directory to develop customizations, access Javadoc, run agents and scripts such as CDT.
Note: You need not to enter the Docker container to complete any of these tasks.
./om-compose.sh start <optional: service name>
./om-compose.sh stop <optional: service name>
./om-compose.sh restart <optional: service name>
Starts stops, and restarts all Docker Compose services. If no service name is passed to the command, all the services are either started, stopped, or restarted. Otherwise, the command works only on the service passed. The service names for different services are omruntime, appserver, mqserver, and db2server.
./om-compose.sh wipe-clean Destroys all containers and deletes all volumes corresponding to your Docker Compose environment. Resets your environment so that you can run the setup again. Optionally, you can keep a backup of your configuration that uses the CDT.
Note: Running the composed script with this argument completely removes the application setup.
./om-compose.sh add-queue
<new_queue_name_in_all_caps> <queue length>
Adds a new local queue on the IBM MQ server and also updates the IBM MQ bindings file. You can also provide a custom queue length, default is 5000.
./om-compose.sh delete-queue
<queue_name_to be deleted_in_all_caps>
Deletes the specified local queue on the IBM MQ server and also updates the IBM MQ bindings file.
./om-compose.sh import-cert <arg1> <arg2> Imports third-party certificates.
It considers the following arguments:
  • The first argument is the path relative to the devtoolkit_docker/certificates directory.
  • The second argument is the alias.
./om-compose.sh remove-cert <arg1> Removes third-party certificates.

The first argument is the alias to be removed.

./om-compose.sh start-agent "<server args,
starting with servername>" <optional:debug port>
<optional:suspend option, Y or y>
Run agent server in debug mode.
  • The first and second arguments are mandatory.
  • If the <debug port> argument is not provided, debugging is not enabled.
  • If debug port is provided, but suspend option argument (Y or y) is not provided, debugging is enabled with suspend=n.
  • If debug port is provided and the suspend option is provided as Y or y, debugging is enabled with suspend=y.
For example, to run ScheduleOrder server with more parameter -jvminstance schedOrdL1, with debug that is enabled on port 8384, and suspend for debug enabled, run the following command:
./om-compose.sh start-agent "ScheduleOrder 
-jvminstance schedOrdL1" 8384 Y
./om-compose.sh start-intg "<server args,
starting with servername>" <optional:debug port>
<optional:suspend option, Y or y>
Run integration server in debug mode.
  • The first and second arguments are mandatory.
  • If the <debug port> argument is not provided, debugging is not enabled.
  • If debug port is provided, but suspend option argument (Y or y) is not provided, debugging is enabled with suspend=n.
  • If debug port is provided and the suspend option is provided as Y or y, debugging is enabled with suspend=y.
./om-compose.sh resetpsw-mq <o:user>

The default password for IBM MQ console is set in the compose/docker/docker-compose.properties file. The MQ_PASS variable contains a password for admin user and MQ_PASS2 contains a password for the reader user.

You can update IBM MQ console user passwords by using the ./om-compose.sh resetpsw-mq <o:user> argument.

<o:user> argument refers to IBM MQ users who are admin or reader user.

After updating the password, you can log in to the IBM MQ console by entering the username, which is admin or reader, and the updated password.

Note: The logs for each command that is run are present in the compose/logs directory.

To perform tasks that are related to Order Service, you can run the ./orderservice-compose.sh command from the devtoolkit_docker/compose-orderservice directory with arguments to suit your requirements. For example, ./orderservice-compose.sh <arguments>. The following table lists the commands and the supported arguments to run the Docker Compose script for Order Service.

Table 2. Commands and arguments to run devtoolkit_docker/compose-orderservice/orderservice-compose.sh
Commands Description
./orderservice-compose.sh setup-upg

Updates an existing Order Service environment with the updated property configurations and/or a new Order Service image.

You can add Order Service properties in devtoolkit_docker/compose-orderservice/docker/configuration/orderservice.properties.

For more information on Order Service properties, see Setting up Order Service.

./orderservice-compose.sh start <optional: service name>

./orderservice-compose.sh stop <optional: service name>

./orderservice-compose.sh restart <optional: service name>

Starts, stops, and restarts Order Service containers. If no service name is passed to the command, all the services are started, stopped, or restarted. Otherwise, the command works only on the service passed. The service names for Order Service, Cassandra, and Elasticsearch containers are orderservice, orderservice-cassandra, and orderservice-elasticsearch, respectively.
Note: The logs for the commands that are run are present in the devtoolkit_docker/compose-orderservice/logs directory.
If your host machine is restarted or rebooted, run the following command to make sure that Docker and Docker Compose are running.
docker ps -a
  • If the command returns your containers in the exit state, browse to the devtoolkit_docker/compose/ directory and run the following command:
    ./om-compose.sh start
  • If Docker is not running, run the following command as a super user:
    systemctl start docker

    Also, you can permanently enable Docker by running the following command as a super user:
    systemctl enable docker