Linux command
docker-container-rename 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Rename a container
docker container rename [old_name] [new_name]
说明
docker container rename renames a container to a new name without affecting its configuration, state, or data. This operation works on both running and stopped containers, allowing you to correct naming mistakes or reorganize your container naming scheme. Container names must be unique on the Docker host. Renaming does not modify the container's ID or any other attributes beyond the name itself. The shorthand alias docker rename is equivalent.
FAQ
What is the docker-container-rename command used for?
docker container rename renames a container to a new name without affecting its configuration, state, or data. This operation works on both running and stopped containers, allowing you to correct naming mistakes or reorganize your container naming scheme. Container names must be unique on the Docker host. Renaming does not modify the container's ID or any other attributes beyond the name itself. The shorthand alias docker rename is equivalent.
How do I run a basic docker-container-rename example?
Run `docker container rename [old_name] [new_name]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.