環境
- XUbuntu 16.04 LTS
- Docker version 18.03.1-ce, build 9ee9f40
背景
Dockerを勉強しています。
docker image prune
の動作を確認したいです。
実行内容
docker image prune
を実行しましたが、imageは削除されませんでした。
containerは1つも存在しない状態です。
shell
1$ docker image ls -a 2REPOSITORY TAG IMAGE ID CREATED SIZE 3<none> <none> e290f676487a 2 hours ago 177MB 4webapp latest b4c14f6096b8 2 hours ago 177MB 5<none> <none> 760dd2c9c191 2 hours ago 177MB 6kawamatsu/webserver 1.0 ae513a47849c 41 hours ago 109MB 7nginx latest ae513a47849c 41 hours ago 109MB 8ubuntu latest 452a96d81c30 4 days ago 79.6MB 9hello-world latest e38bc07ac18e 2 weeks ago 1.85kB 10sample 1.0 e934aafc2206 3 weeks ago 199MB 11sample 2.0 e934aafc2206 3 weeks ago 199MB 12centos centos7 e934aafc2206 3 weeks ago 199MB 13centos latest e934aafc2206 3 weeks ago 199MB 14$ docker container ls -a 15CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 16$ docker image prune 17WARNING! This will remove all dangling images. 18Are you sure you want to continue? [y/N] y 19$ docker image ls -a 20REPOSITORY TAG IMAGE ID CREATED SIZE 21webapp latest b4c14f6096b8 2 hours ago 177MB 22<none> <none> e290f676487a 2 hours ago 177MB 23<none> <none> 760dd2c9c191 2 hours ago 177MB 24kawamatsu/webserver 1.0 ae513a47849c 41 hours ago 109MB 25nginx latest ae513a47849c 41 hours ago 109MB 26ubuntu latest 452a96d81c30 4 days ago 79.6MB 27hello-world latest e38bc07ac18e 2 weeks ago 1.85kB 28centos centos7 e934aafc2206 3 weeks ago 199MB 29centos latest e934aafc2206 3 weeks ago 199MB 30sample 1.0 e934aafc2206 3 weeks ago 199MB 31sample 2.0 e934aafc2206 3 weeks ago 199MB 32$
質問
docker image prune
でimageが削除されないのは、なぜでしょうか?
docker image pruneコマンドのマニュアルページには、「Remove unused images」と書かれています。
「unused images」とは、何でしょうか?
私は、「containerとして参照されなかったimageを『unused image』」と思っているんですが、これが間違いなんだと思います。

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/05/02 13:24