As of Cloud Agent version 1.16.3, LiveEdge Cloud now supports sending all of the information for pulling, creating, and running a Docker container in a single command. This means that users no longer have to wait for a Docker container image to finish being pulled before initiating create and run commands. Uninstallation has also been simplified. Below are the steps to installing and uninstalling a Docker Container with single commands.
See our Docker Container Management article for more information on controlling Docker containers via the LiveEdge Cloud API.
Prerequisites
- LiveEdge Cloud API URL
- Personal Access Token
- GUID for each device on which the Docker container is to be installed
Example: Installing the Videon HTML5 graphic rendering container
- Complete the prerequisites above
- Send the following as a Device Command
- Payload:
{
"command": "docker_install",
"data": {
"app_guid": "custom",
"image_url": "videonlabs/html5-graphics-renderer:latest",
"manifest": {
"restart_policy": {"name": "always", "MaximumRetryCount": 0},
"volumes": [{"host_path":"/data/local/vl-html-file-overlay-app", "container_path": "/app/persist", "mode": "rw"}],
"ports": [{"host_port": 1323, "container_port": 1323}],
"network_mode": "bridge"
}
}
}
- Payload:
- The command will process and automatically pull the image, create the container, and run it without needing further intervention
- Observe that the container is created and running either via GET Device Docker Containers or the Containers tab in the respective device's configuration page on LiveEdge Cloud
- The container will be named "videonlabs-html5-graphics-renderer-latest-custom"
Example: Uninstalling the Videon HTML5 graphic rendering container
- Complete the prerequisites above
- Send the following as a Device Command
- Payload:
{
"command": "docker_uninstall",
"data": {
"image_url": "videonlabs/html5-graphics-renderer:latest"
}
}
- Payload:
- The command will stop any containers created from the same image, remove them, then delete the image
- Observe that the container is no longer on the device via GET Device Docker Containers or the Containers tab in the respective device's configuration page on LiveEdge Cloud