1.docker attach介绍
docker attach命令是用来进入一个正在运行的docker容器
2.docker attach用法
docker attach [参数] container
[root@centos79 ~]# docker attach --help
Usage: docker attach [OPTIONS] CONTAINER
Attach local standard input, output, and error streams to a running container
Aliases:
docker container attach, docker attach
Options:
--detach-keys string Override the key sequence for detaching a container
--no-stdin Do not attach STDIN
--sig-proxy Proxy all received signals to the process (default true)
[root@centos79 ~]#
3.实例
3.1.进入启动的docker容器
命令:
docker attach 800d
[root@centos79 ~]# docker ps -a
本文介绍了Docker的attach命令,用于连接到正在运行的容器。详细讲述了attach的用法,包括如何进入容器以及如何在不终止容器的情况下退出。同时,对比了attach与exec命令的不同之处。
订阅专栏 解锁全文

8636

被折叠的 条评论
为什么被折叠?



