Use Docker Compose

JFrog Connect integration with Docker Compose enables you to utilize Docker Compose's exceptional capabilities to deploy multiple containers to IoT devices.

Connect enables you to deploy multiple containers by using Docker Compose capabilities. When you choose Docker Compose as your Deployment Type, JFrog Connect will upload the corresponding YAML file to Artifactory, and the edge device will pull it during the update.

The recommended approach to managing containers on edge devices is to use Docker Compose.

Prerequisites

  • JFrog Platform Account. (You receive an account with JFrog Platform automatically when you register for a JFrog Connect account.)

  • Connect Agent 6.0 or later on device(s).

  • Docker and Docker Compose installed on your device(s).

  • A Docker Compose configuration file located in Artifactory.

  • Completed the procedures in Deploy Docker.

Docker Compose Version on Device

On the device, Connect Agent checks which version of Docker Compose is present and acts according to the following logic:

  • If docker-compose v1 is present, then Connect Agent uses docker-compose v1.

  • If docker-compose v1 is not present, then it uses Docker Compose v2 (no hyphen).

Therefore, if both Docker Compose v1 and v2 are present, then Connect Agent will use v1.

Configure Docker Compose Options

  1. Enter the source of your Docker Compose YAML file, which may be one of the following, depending on the registry you chose.

JFrog Artifactory Path (YAML file): This is the unique path where the Docker YAML file is located in Artifactory and the YAML file name. Enter this if you chose default-connect for the registry or any other Artifactory registry (see Deploy Docker).

Docker Compose YAML File: If you chose a Docker registry for the registry (see Deploy Docker), drag and drop or browse to enter the Docker Compose YAML file. When you drag and drop, the file is uploaded to “Connect Default Generic” in Artifactory.

  1. Enter the path where the Docker Compose YAML file should be placed on the IoT device. The folder must already exist on this path or the update will fail. (You can create a folder using the Run Command action block.)

Configure On Failure Options

Configure your On Failure policy and instructions for rolling back, if necessary.

On Failure enables you to define what happens upon failure of the Deploy Container action. By default, when the action fails the Docker Compose file is automatically reverted, and everything is restored to its previous state.

Failures that are caused by container logic (e.g., Command fails or Invalid image architecture) are handled by the Docker Compose binary and are not regarded as an action failure.

Complete the Configuration

Save your action configuration.

If you are adding more actions to the workflow, continue to the next one. Otherwise, complete your workflow configuration and save it.

What’s Next?

Learn how to take the next step and run the update deployment.

Last updated

Was this helpful?