niuoh
V2EX  ›  Docker

问一个 docker 小白问题!

  •  
  •   niuoh · May 7, 2016 · 4315 views
    This topic created in 3856 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
    cuiweiqiang
    May 7, 2016 via iPhone
    1
    docker ps -a
    YUX
    YUX
    May 7, 2016
    2
    小白用 DaoCloud 操作 Docker 会容易很多

    我的博客内有些用 DaoCloud 控制台部署 Docker 你内容给你参考 https://www.yux-io.com/
    niuoh
    niuoh
    OP
    May 7, 2016
    3
    @cuiweiqiang 看到了 docker ps -l 和-a 的区别是啥 还有-a 下有好多啊 我怎么清空?
    niuoh
    niuoh
    OP
    May 7, 2016
    4
    @cuiweiqiang 找到了 docker rm -f $(docker ps -a -q)这条命令来清空所有容器
    zdkmygod
    zdkmygod
    May 7, 2016
    6
    @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   ·   Privacy   ·   Solana   ·   2632 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 48ms · UTC 10:31 · PVG 18:31 · LAX 02:31 · JFK 05:31
    ♥ Do have faith in what you're doing.