Linux command
docker-container-start 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Start a stopped container
docker container start [container]
Start multiple containers
docker container start [container1] [container2]
Start with attached output
docker container start -a [container]
Start interactively
docker container start -ai [container]
说明
docker container start starts one or more stopped containers, resuming them from their previous state. Unlike docker container run, which creates a new container, this command operates on existing containers that have been stopped. The container resumes with its original configuration, including environment variables, volumes, network settings, and the command that was initially specified. This makes it useful for restarting services or resuming work in development containers.
参数
- -a, --attach
- Attach STDOUT/STDERR.
- -i, --interactive
- Attach STDIN.
FAQ
What is the docker-container-start command used for?
docker container start starts one or more stopped containers, resuming them from their previous state. Unlike docker container run, which creates a new container, this command operates on existing containers that have been stopped. The container resumes with its original configuration, including environment variables, volumes, network settings, and the command that was initially specified. This makes it useful for restarting services or resuming work in development containers.
How do I run a basic docker-container-start example?
Run `docker container start [container]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -a, --attach do in docker-container-start?
Attach STDOUT/STDERR.