← 返回命令列表

Linux command

crane-mutate 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Add labels

crane mutate [image] --label [key=value] -t [new:tag]

Set entrypoint

crane mutate [image] --entrypoint [/app/start] -t [new:tag]

Add environment variables

crane mutate [image] --env [KEY=value] -t [new:tag]

说明

crane mutate modifies container image configuration without rebuilding. It can change labels, entrypoint, environment variables, and other metadata.

参数

-t, --tag _tag_
Tag for the mutated image.
--label _key=value_
Add or override a label.
--entrypoint _cmd_
Set the entrypoint.
--cmd _cmd_
Set the command.
--env _key=value_
Add environment variable.
--user _user_
Set the user.
--workdir _dir_
Set the working directory.

FAQ

What is the crane-mutate command used for?

crane mutate modifies container image configuration without rebuilding. It can change labels, entrypoint, environment variables, and other metadata.

How do I run a basic crane-mutate example?

Run `crane mutate [image] --label [key=value] -t [new:tag]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -t, --tag _tag_ do in crane-mutate?

Tag for the mutated image.