Linux command
crane-config 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Get image configuration
crane config [image]
Get config as JSON
crane config [image] | jq .
说明
crane config retrieves the configuration blob for a container image. This includes environment variables, entrypoint, command, working directory, labels, exposed ports, and other image metadata defined in the OCI image specification. Output is in JSON format, making it easy to pipe to jq for field extraction.
参数
- --platform _os/arch_
- Specify platform for multi-arch images (e.g., `linux/amd64`).
FAQ
What is the crane-config command used for?
crane config retrieves the configuration blob for a container image. This includes environment variables, entrypoint, command, working directory, labels, exposed ports, and other image metadata defined in the OCI image specification. Output is in JSON format, making it easy to pipe to jq for field extraction.
How do I run a basic crane-config example?
Run `crane config [image]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --platform _os/arch_ do in crane-config?
Specify platform for multi-arch images (e.g., `linux/amd64`).