Usage

Limitations for Docker Compose

The docker compose file cannot contain volumes with these reserved targets:
  • /config
  • /data
  • /edge-agent
  • /edge-core
  • /shared

If the image is to be pulled from the DTR, it should be referenced in the docker compose file with the digest in the format dtr/image@digest. Get the digest for current images by running docker images --digests.

If the image is to be loaded from a tar file, it should be saved and referenced in the docker compose file without the DTR prefix in the format image:tag.

Application Builder Helper Script

The following script (edge-app-build) is provided to help package a Docker app into the expected Edge App tar.gz archive format.

% /usr/bin/python3 ./edge-app-build --help

Usage: edge-app-build [-h] [-n APP_NAME] [-b BUILD_DIR] [-o OUTPUT_DIR] [-f] src

Table 1. Required Arguments
Argument Description
src The path to the folder containing the docker-compose.yml and other files for this application.
Table 2. Optional Arguments
Argument Description
-h, --help Show this help message and exit.
-n APP_NAME, --app-name APP_NAME The name of the application (default = prompt()).
-b BUILD_DIR, --build-dir BUILD_DIR The directory to create the Edge application in.
-o OUTPUT_DIR, --output-dir OUTPUT_DIR The directory to save the built Edge application in.
-f, --force Overwrite the build and output directories without prompting.

Docker Login/Logout

If your Edge Applications will pull images from a private docker registry, you need to create a custom command on Edge Manager to execute the "Docker Login" command on your Edge devices so that Edge Agent can authenticate with the docker registry. You create this command with Edge Manager's Add Command feature. You may want to also create a docker logout command in case you want to prevent an Edge Device from pulling from the registry in the future.

Docker Login

Use the following field values to create the Docker Login command:
  • Display Name: Docker Login
  • Command: docker-login
  • Handler: ApplicationManager
  • Has Output: <checked>
  • Platform: Predix Edge
  • Parameters:
    1. Parameters Name: registry

      Key: registry

      Value: <blank or desired default>

      Editable: <checked>

    2. Parameters Name: username

      Key: username

      Value: <blank or desired default>

      Editable: <checked>

    3. Parameters Name: password

      Key: password

      Value: <blank or desired default>

      Editable: <checked>

Docker Logout

Use the following field values to create the Docker Login command:
  • Display Name: Docker Logout
  • Command: docker-logout
  • Handler: ApplicationManager
  • Has Output: <checked>
  • Platform: Predix Edge
  • Parameters:
    1. Parameters Name: registry

      Key: registry

      Value: <blank or desired default>

      Editable: <checked>