0
0

More than 1 year has passed since last update.

AWS ECR プルスルーキャッシュリポジトリの罠

Posted at

起きた事象

  • ECSのタスク定義に以下のような感じでデプロイしたら、CannotPullContainerError: inspect image has been retried 1 time(s): failed to resolve ref "xxxxxxxxx.dkr.ecr.ap-northeast-1.amazonaws.com/ecr-public/datadog/agent:latest"で落ちました。
{
  "name": "datadog-agent",
  "image": "xxxxxxxxx.dkr.ecr.ap-northeast-1.amazonaws.com/ecr-public/datadog/agent:latest",
  "essential": true,
  "cpu": 10,
  "memoryReservation": 256,
  "logConfiguration": {
    "logDriver": "awslogs",
    "secretOptions": null,
    "options": {
      "awslogs-group": "/ecs/datadog",
      "awslogs-region": "ap-northeast-1",
      "awslogs-stream-prefix": "ecs"
    }
  },
  "environment": [
    {
      "name": "DD_DOGSTATSD_NON_LOCAL_TRAFFIC",
      "value": "true"
    },
    {
      "name": "DD_ENV",
      "value": "staging"
    },
    {
      "name": "ECS_FARGATE",
      "value": "true"
    }
  ],
  "secrets": [
    {
      "valueFrom": "/ecs/datadog/api_key",
      "name": "DD_API_KEY"
    }
  ]
}
  • デプロイでコンテナを利用するタイミングで、勝手にキャッシュしてくれると思ったのだが・・・・。

推測する原因

  • 初回は、手動でdocker pull xxxxxxxxx.dkr.ecr.ap-northeast-1.amazonaws.com/ecr-public/datadog/agent:latestして、リポジトリが作成される必要があるみたい。
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0