Deploy Docker Image

JFrog Connect enables you to quickly deploy a single Docker image directly to your edge devices.

Use this procedure to create an update flow that uses the Deploy Docker Image step type.

Prerequisites

  • JFrog Connect account and at least one device registered.

  • Docker installed on the device.

  • One or more Docker images in the JFrog Platform ready for deployment. If you need to push an image to the JFrog Platform, use the docker tag and docker push commands as shown below.

  • In the Create Update Flow procedure, completed through Step 3.

Add a Step and Configure the Step Type

To add a step and configure the step type you have chosen, do the following:

  1. In the Create New Flow page, click Add Step.

  2. In the Step Type dropdown list, choose Deploy Docker Image, give the step a Step Name, and create the step.

  3. JFrog Registry: Choose the JFrog Registry where your artifact is stored. If the registry does not appear in the list, go to Add JFrog Registry to add yours to the list. Then return to this configuration and the added registry will appear in the list.

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

Image Path: This is the unique path and file name where the container image is located. For example: platform-URL/base-repo/docker-repo/docker-image Enter this if you chose default-connect for the registry or any other Artifactory registry (see Deploy Docker).

Image Name: Enter the docker image name if you chose a Docker registry for the registry.

  1. Enter the Image Tag.

  2. Delete Previous Image: Mark the checkbox to delete the current image after the new Docker image has been deployed. This is the default setting.

Run and Command Parameters (Optional)

  1. Choose a command from the list and then enter the run flag. These are the same flags used in the docker run command.

  2. Click Add if you want to enter an additional run flag. You can run as many as you want.

Command

The Docker run command structure uses official docker commands, but in a structured manner.

docker run [OPTIONS] IMAGE [COMMAND] [ARG...]

To add the command to run in the Docker image, remove all parts except for [COMMAND] [ARG…]

For example, in the following CLI deployment:

docker run alpine:latest echo hello world 

the command will be: echo hello world

For [OPTIONS] use the Docker Run flags.

On Failure (Optional)

  1. Configure your On Failure policy and instructions for rolling back.

  2. Save your step configuration.

What’s Next?

Learn how to go on to the next step and run the update deployment.

Was this helpful?