zoukankan      html  css  js  c++  java
  • docker常用命令

    进入一个正在运行的容器命令:

    [root@localhost ~]# docker ps    ###列出正在运行的容器
    CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                    NAMES
    3212ddd69f38        ubuntu:16.04        "/bin/bash"         35 minutes ago      Up 35 minutes                                agitated_ptolemy
    43c1c07316af        training/webapp     "python app.py"     39 minutes ago      Up 39 minutes       0.0.0.0:5000->5000/tcp   admiring_mestorf
    [root@localhost ~]# docker exec -it 3212ddd69f38 /bin/bash   ###进入这个id的容器

    删除一个镜像:

    [root@localhost ~]# docker images
    REPOSITORY                  TAG                 IMAGE ID            CREATED             SIZE
    docker.io/nginx             latest              f68d6e55e065        3 days ago          109 MB
    docker.io/ubuntu            16.04               13c9f1285025        2 weeks ago         119 MB
    docker.io/httpd             latest              e77c77f17b46        3 weeks ago         140 MB
    docker.io/centos/httpd      latest              2cc07fbb5000        6 months ago        258 MB
    docker.io/ubuntu            15.10               9b9cb95443b5        2 years ago         137 MB
    docker.io/training/webapp   latest              6fae60ef3446        4 years ago         349 MB
    [root@localhost ~]# docker rmi -f 9b9cb95443b5  ##删除指定id的镜像
    Untagged: docker.io/ubuntu:15.10
    Untagged: docker.io/ubuntu@sha256:02521a2d079595241c6793b2044f02eecf294034f31d6e235ac4b2b54ffc41f3
    Deleted: sha256:9b9cb95443b5f846cd3c8cfa3f64e63b6ba68de2618a08875a119c81a8f96698
    [root@localhost ~]# docker images
    REPOSITORY                  TAG                 IMAGE ID            CREATED             SIZE
    docker.io/nginx             latest              f68d6e55e065        3 days ago          109 MB
    docker.io/ubuntu            16.04               13c9f1285025        2 weeks ago         119 MB
    docker.io/httpd             latest              e77c77f17b46        3 weeks ago         140 MB
    docker.io/centos/httpd      latest              2cc07fbb5000        6 months ago        258 MB
    docker.io/training/webapp   latest              6fae60ef3446        4 years ago         349 MB
    [root@localhost ~]# 
  • 相关阅读:
    k8shelm
    利用TweenMax实现贝塞尔曲线运动
    flashPlayer自动降频后webgame处理技巧
    求字符串长度的好方法
    robotlegs 笔记
    pureMVC的svn地址
    完美解决as3在ie中初始化时stageWidth和stageHeight为0的问题
    God of War Ascension / 战神4, 再一次迎来新导演!
    《危情谍战 Knight and Day》又一部好电影!
    未来,突破束缚是唯一的选择?
  • 原文地址:https://www.cnblogs.com/Crazy-Liu/p/11138109.html
Copyright © 2011-2022 走看看