When are containers pulled from remote registries to core device local registry when running docker compose in greengrass component?

0

Let's suppose I have a greengrass component dependent on the docker application manager and I use docker compose for container orchestration.

---
RecipeFormatVersion: '2020-01-25'
ComponentName: io.foobar.example
ComponentVersion: '0.1.0'
ComponentDescription: foobar example
ComponentPublisher: foobar
ComponentDependencies:
  aws.greengrass.DockerApplicationManager:
    VersionRequirement: 2.0.11
  aws.greengrass.TokenExchangeService:
    VersionRequirement: 2.0.3
Manifests:
  - Platform:
      os: linux
    Lifecycle:
      startup: docker compose -f {artifacts:path}/docker-compose.yml up -d
      shutdown: docker compose -f {artifacts:path}/docker-compose.yml down
    Artifacts: 
      - URI: "docker:eclipse-mosquitto:2.0"
      - URI: "docker:<ID>.dkr.ecr.<region>amazonaws.com/foobar/example-container@sha256:<SHA256>"
      - URI: "s3://greengrass/components/io.foobar.example/0.1.0/artifacts/docker-compose.yml"
      - URI: "s3://greengrass/components/io.foobar.example/0.1.0/artifacts/mosquitto.conf"

Will the containers be pulled from remote registries down to the core device local registry before the startup lifecycle is executed or during the startup command when docker compose up is executed?

1 Answer
1
Accepted Answer

I ran a test by removing the shutdown lifecycle command and removed docker compose from startup lifecycle command. Containers are pulled to core device local registry before any lifecycle commands are exected.

mpung
answered a month ago
profile picture
EXPERT
reviewed a month ago
profile picture
EXPERT
reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions