Professional Cloud DevOps Engineer(Google Cloud) 無料問題 4 / 10 ・ 分野2: Building and implementing CI/CD pipelines, including continuous testing, for application, infrastructure, and machine learning workloads
Artifact RegistryのDocker cleanupで、子imageはdelete条件に一致するが、そのimageを参照する親manifestは削除対象でない。通常の扱いはどれか。
- 親manifestから参照される子imageは削除されない
- 子imageを削除し親manifestも同時に削除する
- 子imageを削除し親manifestの参照はそのまま残す
- 子imageを削除し親manifestの該当参照を書き換える
正解と解説を見る
正解: A
正解の理由
「親manifestから参照される子imageは削除されない」が適切。公式ドキュメント「Configure cleanup policies」の「Create a delete policy」には、"Note: Cleanup policies for Docker images don't delete images referenced by a parent manifest." とある。Docker cleanupは親manifestに参照されるimageを削除しない。親が残る条件では、子のdelete条件一致だけで削除しない。
違う選択肢
「子imageを削除し親manifestの参照はそのまま残す」…参照先を失う形で子だけを削除する挙動ではない。
「子imageを削除し親manifestも同時に削除する」…子の一致を根拠に、条件に一致しない親まで連鎖削除する仕様ではない。
「子imageを削除し親manifestの該当参照を書き換える」…cleanupが親manifestの内容を編集して別の構成へ作り替えるわけではない。
押さえどころ
multi-architecture imageの保持期間を設計するときは、個別imageの年齢だけでなくmanifestとの参照関係も確認する。
Professional Cloud DevOps Engineer(Google Cloud)の演習アプリ(無料10問・全問は解錠で)へ