- Newest
- Most votes
- Most comments
The issue is that docker
is a pre-requisite of aws.greengrass.DockerApplication
, while in your case you are installing docker
via the docker-compose-dependencies
component which is only a dependency of your docker-compose-yaml
component. When Greenrass tried to pull the docker:
container images artifacts, it fails since docker is not yet installed.
While I would recommend to install dependencies such as docker, language run-times, etc, as part of the device system image, you can:
-
Replace the
docker:
artifacts withs3:
artifacts, storing the container images in S3 and loading them up in your recipeRun:
lifecycle viadocker load {artifacts:path}/image.tar.gz
. The advantage of this approach is that the image is downloaded before your current component is stopped, thus limiting the downtime -
Remove the container images from the artifacts section and perform a
docker pull <image>
in your recipeRun:
lifecycle. This allows you to leverage the container registry and not have to export the image to S3, but will cause a longer downtime, since your current component will be stopped before the new image gets pulled from the registry. -
Install docker on the system, and only keep
curl -L https://github.com/ubiquiti/docker-compose-aarch64/releases/download/1.22.0/docker-compose-Linux-aarch64 -o /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose"
as part of yourdocker-compose-dependencies
component. -
Ensure
docker-compose-dependencies
is deployed to the device before deploying thedocker-compose-yaml
component (or any other component depending onaws.greengrass.DockerApplication
.
Relevant content
- asked 2 years ago
- Accepted Answerasked 4 years ago
- Accepted Answerasked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 2 years ago
Thanks a lot for your answer!
latest
, the image might not endup being the one you expect since Greengrass might not pull it from the repodocker-compose-dependencies
component has been already deployed to the devices where you want to deploydocker-compose-yaml
.