GithubHelp home page GithubHelp logo

devops's People

Contributors

huenchao avatar

Watchers

 avatar

devops's Issues

docker

  1. 帮助命令 docker --help、docker info、docker version

  2. docker images 列出本机的镜像
    [OPTIONS说明] :
    2.1 -a: 列出本地所有的镜像(含中间映像层)
    2.2 -q: 只显示镜像ID
    2.3 --digests: 显示镜像摘要信息
    2.4 --no-trunc:显示完整的镜像信息
    image

  3. docker search 某个xxx镜像的名字
    [OPTIONS说明] :
    3.1 --no-trunc: 列出完整的镜像描述
    3.2 -s: 列出star数目不小于指定数的镜像
    3.3 --automated: 只列出automated build类型的镜像

  4. docker rmi 镜像名称:[tag 默认是latest] 删除镜像名字or id
    4.1 删除一个: docker rmi -f 镜像id
    4.2 删除多个:docker rmi -f 镜像名字1:TAG 镜像名字2:TAG
    4.3 删除全部: docker rmi -f ${docker images -qa}

  5. 容器命令(有镜像才能创建容器,这是根本前提):docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
    [OPTIONS说明] :
    --name="容器新名字":为容器指定的一个名称
    -d:daemon运行,并返回容器ID,也即启动守护容器;
    -i: 以交互模式运行容器,通常与-t同时使用;
    -t: 为容器重新分配一个伪输入终端,通常与-i同时使用。
    -P: 随机端口映射
    -p:指定端口映射,有以下四种格式
    ip:hostPort:containerPort
    ip::containerPort
    hostPort:containerPort
    containerPort

eg: docker run -it --name 我自定义的容器名字 镜像名 /bin/bash

image

docker run -it --name -p 8080(主机端口):8080(docker里的端口) 镜像名

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.