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

    docker run -t -i <image> 用镜像创建一个容器


    docker pull image 拉拽镜像


    docker images 查看可用镜像


    docker ps 查看运行的容器


    docker ps -a 查看所有的容器


    docker stop <container id> 停止该容器


    docker start <container id> 开始该容器


    docker attach <container id>与该容器交互


    docker commit <container id> <new id>创建当前运行镜像的新的镜像(包含改变)


    docker rm <container id>删除容器


    docker rmi <image name>删除镜像


    docker cp <container Id>:/file/path/within/container /host/path/target 从Docker容器内拷贝文件到主机上


    sudo docker save -o ubuntu_14.04.tar ubuntu:14.04 导出镜像文件


    sudo docker load --input ubuntu_14.04.tar 导入镜像文件


    docker exec -it <container id> /bin/sh   与容器交互


    docker inspect <container id>    容器信息


    docker build -t apache-php2 .     Dockerfile创建镜像


    docker tag <container id> username/name:devel 修改镜像的标签

    docker rm -f `docker ps -a -q` 删除所有容器

    docker rmi -f `docker images -q` 删除所有镜像

    docker cp 本地路径 容器长ID:容器路径

  • 相关阅读:
    CCNP-----企业网三层架构——BCMSN
    Redis 的 GEO 特性将在 Redis 3.2 版本释出
    CentOS6.5上源码安装MongoDB3.2.1
    beanstalkd
    php7---redis
    MongoDB学习笔记(入门)
    MongoDB学习笔记(数据操作)
    MongoDB学习笔记(索引)
    CentOS 安装MongoDB
    爬虫----Web_WeChat
  • 原文地址:https://www.cnblogs.com/websecyw/p/10245915.html
Copyright © 2011-2022 走看看