如何启动一个docker容器
1、交互式方式启动
[root@localhost shell]# docker run --name=centos -it centos /bin/bash
[root@ae6422da415e /]#
当使用exit退出时,容器也会跟着停止
2、守护进程方式启动
[root@localhost shell]# docker run --name=centos -td centos
e99176a97a4f15855f2b89cf3fc34484514f09e436fa64a1fab99046584ed086

进入容器
[root@localhost shell]# docker exec -it centos bash
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。