| 用途 | 读取镜像元数据 |
|---|---|
| 语法 | docker image inspect 镜像 [--format 模板] |
| 关键字段 | Architecture / Os / Config / RootFS / RepoDigests |
示例
示例
docker image inspect nginx:1.27
docker image inspect app/web:1.0 --format '{{.Architecture}}/{{.Os}} size={{.Size}}'
docker image inspect app/web:1.0 --format '{{json .Config.Env}}'RootFS.Layers 是层摘要列表;RepoDigests 只在镜像来自 registry(pull 或 push 后)时才有内容。