docker 中 centos7

 >docker run -itd --name centos_7 centos:7 /bin/bash

docker run:启动一个容器 没有就新创建

-itd: 

-i保持STDIN打开 允许你输入到容器中进行

-t 为容器分配一个伪终端

-d 容器在后台运行

--name: 指定容器的名称

centos:7 镜像的名称  基于这个镜像搞的容器

/bin/bash  :容器要运行的命令  在这个命令行表示运行bash shell

 

 

 

posted @ 2023-10-30 12:28  胖豆芽  阅读(2)  评论(0编辑  收藏  举报