• docker 容器管理上


    Docker 容器管理:
    
    docker create -it centos //这样可以创建一个容器,但该容器并没有启动:
    
    docker start container_id //启动容器后,可以使用docker ps 查看到,有start 就有stop,和restart
    
    前台启动docker容器:
    
    
    
    docker run -it linux123 /bin/bash
    
    
    docker:/root# docker ps
    CONTAINER ID        IMAGE                        COMMAND             CREATED             STATUS              PORTS               NAMES
    b8e15e36e3ec        linux123                     "/bin/bash"         10 seconds ago      Up 8 seconds                            furious_carson 
    
    
    
    docker:/root# docker ps -a
    CONTAINER ID        IMAGE                        COMMAND             CREATED             STATUS                        PORTS               NAMES
    b8e15e36e3ec        linux123                     "/bin/bash"         2 minutes ago       Exited (0) 10 seconds ago                         furious_carson   
    
    
    
    后台运行docker:
    
    docker run -itd linux123 /bin/bash
    
    
    进入容器:
    
    docker:/root# docker ps
    CONTAINER ID        IMAGE                        COMMAND             CREATED             STATUS              PORTS               NAMES
    cf329e96109d        centos_6.5:zjzc              "/bin/bash"         32 minutes ago      Up 32 minutes                           kickass_pasteur       
    382cdd674040        centos_6.5_net:scan          "/bin/bash"         40 minutes ago      Up 40 minutes                           nostalgic_fermi       
    ec430386e30c        centos-6-x86-template:zjzc   "/bin/bash"         58 minutes ago      Up 58 minutes                           hungry_pare           
    c0895b3b9477        blalor/centos                "/bin/bash"         19 hours ago        Up 19 hours                             loving_meitner        
    40d30fb0fc60        blalor/centos                "/bin/bash"         19 hours ago        Up 19 hours                             admiring_cray         
    c0dfbb37f841        centos                       "/bin/bash"         20 hours ago        Up 20 hours                             fervent_ardinghelli   
    
    
    docker:/root# docker exec -it cf329e96109d /bin/bash
    
    

  • 相关阅读:
    java-transaction事件
    Cookie,Session基础知识
    JSP基础笔记
    PHP----学生管理系统
    C语言程序设计-----贪吃蛇
    2019年数维杯三场征战赛
    回忆2018年高教杯数学建模大赛
    iPad横屏模式研究
    IOS UIWebView截获html并修改便签内容,宽度自适应
    如何保持iOS上键盘出现时输入框不被覆盖
  • 原文地址:https://www.cnblogs.com/zhaoyangjian724/p/6200310.html
Copyright © 2020-2023  润新知