Usage
Limitations for Docker Compose
/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
Argument | Description |
---|---|
src | The path to the folder containing the docker-compose.yml and other files for this application. |
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
- Display Name: Docker Login
- Command: docker-login
- Handler: ApplicationManager
- Has Output: <checked>
- Platform: Predix Edge
- Parameters:
- Parameters Name:
registry
Key: registry
Value: <blank or desired default>
Editable: <checked>
- Parameters Name:
username
Key: username
Value: <blank or desired default>
Editable: <checked>
- Parameters Name:
password
Key: password
Value: <blank or desired default>
Editable: <checked>
- Parameters Name:
registry
Docker Logout
- Display Name: Docker Logout
- Command: docker-logout
- Handler: ApplicationManager
- Has Output: <checked>
- Platform: Predix Edge
- Parameters:
- Parameters Name:
registry
Key: registry
Value: <blank or desired default>
Editable: <checked>
- Parameters Name:
registry