niuoh
V2EX  ›  Docker

问一个 docker 小白问题!

  •  
  •   niuoh · May 7, 2016 · 3906 views
    This topic created in 3682 days ago, the information mentioned may be changed or developed.

    我 pull 下来了一个阿里云的 docker lnmp 镜像 在我的个人电脑上 连续运行了两天之后 docker stop 掉了 然后再 docker ps -l 咋看不到了呢 还好停止之前以前把容器里网站迁出来了 一般不是 docker stop 之后能在 docker ps -l 里还能看到并继续运行吗 这是什么情况??

    6 replies    2016-05-07 18:39:46 +08:00
    cuiweiqiang
        1
    cuiweiqiang  
       May 7, 2016 via iPhone
    docker ps -a
    YUX
        2
    YUX  
    PRO
       May 7, 2016
    小白用 DaoCloud 操作 Docker 会容易很多

    我的博客内有些用 DaoCloud 控制台部署 Docker 你内容给你参考 https://www.yux-io.com/
    niuoh
        3
    niuoh  
    OP
       May 7, 2016
    @cuiweiqiang 看到了 docker ps -l 和-a 的区别是啥 还有-a 下有好多啊 我怎么清空?
    niuoh
        4
    niuoh  
    OP
       May 7, 2016
    @cuiweiqiang 找到了 docker rm -f $(docker ps -a -q)这条命令来清空所有容器
    zdkmygod
        6
    zdkmygod  
       May 7, 2016
    @niuoh

    $ docker ps --help

    Usage: docker ps [OPTIONS]

    List containers

    -a, --all=false Show all containers (default shows just running)
    --before= Show only container created before Id or Name
    -f, --filter=[] Filter output based on conditions provided
    --format= Pretty-print containers using a Go template
    --help=false Print usage
    -l, --latest=false Show the latest created container, include non-running
    -n=-1 Show n last created containers, include non-running
    --no-trunc=false Don't truncate output
    -q, --quiet=false Only display numeric IDs
    -s, --size=false Display total file sizes
    --since= Show created since Id or Name, include non-running
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1359 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 17:10 · PVG 01:10 · LAX 10:10 · JFK 13:10
    ♥ Do have faith in what you're doing.