search

Home  >  Q&A  >  body text

dockerfile - docker build images失败后如何删除

最近刚入门docker,打算跟着官方例子学习,随手找了个redis的example,结果在build途中,容量达到了15g+,中途想放弃直接关闭shell了。 后来怎么找都没法找到images,自然占着的空间也没法清理了,请问有什么办法清理呢。 包括docker images也用了,也找不到容器。
是在这一句后中断的,docker build -t /redis .

PHP中文网PHP中文网2773 days ago1179

reply all(1)I'll reply

  • PHPz

    PHPz2017-04-22 08:57:44

    docker images
    

    The names, IDs and other parameters of all images in the system will be displayed, as follows:

    adolph@geek:~$ docker images
    REPOSITORY                                 TAG                   IMAGE ID            CREATED             VIRTUAL SIZE
    kalilinux/kali-linux-docker                latest                b8b8ce44934b        2 days ago          313.7 MB
    index.alauda.cn/adolphlwq/spark-utlimate   latest                62555794533c        5 days ago          1.017 GB
    spark-ultimate                             latest                62555794533c        5 days ago          1.017 GB
    adolphlwq/ubuntu-java                      latest                5e364fee9f00        10 days ago         645.2 MB
    duohuostudio/ubuntu                        14.04_64_base_image   bdbcf2ae2d80        11 days ago         269.1 MB
    adolphlwq/ubuntu                           14.04_64_base_image   bdbcf2ae2d80        11 days ago         269.1 MB
    ubuntu                                     latest                07f8e8c5e660        4 weeks ago         188.3 MB
    busybox                                    latest                8c2e06607696        6 weeks ago         2.433 MB
    training/webapp                            latest                31fa814ba25a        12 months ago       278.8 MB
    crosbymichael/dockerui                     latest                109c8f1f632d        14 months ago       398.7 MB
    
    

    Generally, the image building failsREPOSITORYTAG显示<none>, but the ID is still there. Find your failed id

    docker rmi -f [your failed image id]
    

    That’s it.

    reply
    0
  • Cancelreply