LoginSignup
0
0

docker (33) docker rmi で10分以上待ち

Last updated at Posted at 2019-07-18

Error response from daemon: conflict: unable to delete (must be forced) - image is being used by stopped container

macOS
$ docker images
REPOSITORY                       TAG                 IMAGE ID            CREATED             SIZE
kaizenjapan/python3-input        latest              e74375615f78        About an hour ago   10.1GB
<none>                           <none>              82aa943c940e        About an hour ago   10.1GB
<none>                           <none>              e556dbc95e6b        About an hour ago   10.1GB
kaizenjapan/wordcount            latest              8144c217aa50        6 days ago          197MB
kaizenjapan/openjij-ch1-ubuntu   latest              31f8ffbbbf06        3 weeks ago         858MB
kaizenjapan/anaconda-openjij     latest              7ca01b3d84fc        3 weeks ago         3.94GB
ubuntu                           latest              4c108a37151f        4 weeks ago         64.2MB
continuumio/anaconda3            latest              cb34e4508fdc        7 weeks ago         3.72GB

$ docker rmi 8144c217aa50
Error response from daemon: conflict: unable to delete 8144c217aa50 (must be forced) - image is being used by stopped container d2c537d2d5df

こういう時はまず docker ps -a

macOS
$ docker ps -a
CONTAINER ID        IMAGE                            COMMAND                  CREATED             STATUS                   PORTS                    NAMES
70f17570ad1c        ubuntu                           "/bin/bash"              3 hours ago         Up 3 hours                                        stoic_easley
d2c537d2d5df        kaizenjapan/wordcount            "/bin/bash"              6 days ago          Exited (0) 6 days ago                             distracted_jackson
fb640b2210cf        ubuntu                           "/bin/bash"              7 days ago          Up 7 days                                         upbeat_tesla
f85c350c3f1e        kaizenjapan/openjij-ch1-ubuntu   "/bin/bash"              3 weeks ago         Up 3 weeks               0.0.0.0:8080->8080/tcp   agitated_dirac
5f528d66d2e5        kaizenjapan/openjij-ch1-ubuntu   "/bin/bash"              3 weeks ago         Exited (0) 3 weeks ago                            kind_leavitt
33a4c9b48968        kaizenjapan/openjij-ch1-ubuntu   "/bin/bash"              3 weeks ago         Created                                           modest_wright
2651e9e533e2        ubuntu                           "/bin/bash"              3 weeks ago         Up 3 weeks                                        optimistic_wozniak
2acdf0e00448        continuumio/anaconda3            "/usr/bin/tini -- /b…"   3 weeks ago         Up 3 weeks               0.0.0.0:8888->8888/tcp   silly_cocks
64a6907d71b6        continuumio/anaconda3            "/usr/bin/tini -- /b…"   3 weeks ago         Exited (1) 3 weeks ago                            affectionate_curie

#Error response from daemon: You cannot remove a running container

macOS
$ docker rm 2acdf0e00448
Error response from daemon: You cannot remove a running container 2acdf0e00448f2aa3ae57e5aa690065fb5bb1a139155f0181404435d7b515c72. Stop the container before attempting removal or force remove

stopするか、中でexitする。

docker/ubuntu
# exit
exit
$

exit表示してくれなくても、コマンドプロンプト変わるからわかるんだけど。

macOS
$ docker rmi 8144c217aa50 

今度はエラーがでるんじゃなくて、10分経っても、うんともすんとも変わらない。
別のshellでpsすると、やっぱりまだ動いているっぽい。

macOS
$ ps -ax
...
36864 ttys006    0:00.07 docker rmi 8144c217aa50

どうしよう。今日は、待ち時間が多い。
コマンドを待っている間には、記事書いている。
その前のエラーのやつと、この記事の書きかけ。
何もせずに待つことはない。

最後までおよみいただきありがとうございました。

いいね 💚、フォローをお願いします。

Thank you very much for reading to the last sentence.

Please press the like icon 💚 and follow me for your happy life.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0