Reuse container layer on docker-compose for GreenGrass deployment

0

We have a component that starts multiple container on our greengrass device using docker-compose. According to the documentation, the correct way to provide the private docker images from ECR is to supply them as artefact:

"URI": "docker:public.ecr.aws/cloudwatch-agent/cloudwatch-agent:latest"

One important aspect of our project is that we can reuse layers of our images. We have limited bandwidth on our devices and images can be big (i.e. PyTorch). If we have modification to do to our images, usually only the last small layer will be updated over the limited bandwidth network. I am worried when we are using images as artifacts, the whole image is going to be re-downloaded. Is that the case ?

I currently have a workaround of using the "install" lifecycle step to execute "docker-compose pull" and removing the artifacts, but that has the issue of being run on reboot, while I would rather only have it update the images when there is a new deployment.

1回答
1
承認された回答

Hello TSpark,

Docker pull will not redownload images which already exist. It will only download layers which have changed or do not exist. When using Greengrass to download images as artifacts, Greengrass simply calls docker pull, so all the same caching which Docker does applies equally to Greengrass.

AWS
エキスパート
回答済み 2年前
  • Awesome, that is great news. Thanks a lot !

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ