Docker入门

    • 远程仓库拉取镜像到本地
      docker pull [options] NAME[:TAG]
    • 指定查看本地某一个镜像
      docker images [options] [REPOSITORY[:TAG]]
    • 运行镜像
      docker run [options] IMAGE[:TAG] [COMMAND] [ARG..]

    • 1.在网易蜂巢镜像中心,查找镜像,复制拉取地址
    • 2.拉取镜像
      docker pull hub.c.163.com/library/nginx:latest
    • 3.查看镜像
      docker images
    • 4.在后台运行容器
      docker run -d hub.c.163.com/library/nginx
    • 6.进入容器内部
      docker exec -it [containerID] bash
    • 7.查询一下nginx在什么位置
      which nginx
    • 8.安装ps,利用ps命令查看进程
      apt-get updateapt-get install procpsps -ef​
    • 9.退出容器
       exit
    • 10.停止运行容器
      docker stop [containerId]
posted @ 2020-04-28 20:45  margot921  阅读(86)  评论(0编辑  收藏  举报