例)
docker build -t sample/php-apache -f .docker/php-apache/Dockerfile . [707/794]
[+] Building 5.2s (10/14)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 37B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/php:7.4.27-apache 1.9s
=> [auth] library/php:pull token for registry-1.docker.io 0.0s
=> [1/9] FROM docker.io/library/php:7.4.27-apache@sha256:729ad01c7d8e10fd992a6d4f3eb05dce3fb69bdf5c4fb4a9de4be4f4f5ae4dcc 0.0s
=> [internal] load build context 3.2s
=> => transferring context: 3.71MB 3.1s
=> CACHED [2/9] COPY .docker/php-apache/000-default.conf /etc/apache2/sites-available/000-default.conf 0.0s
=> CACHED [3/9] COPY .docker/php-apache/lisket.jp.conf /etc/apache2/sites-available/lisket.jp.conf 0.0s
=> CACHED [4/9] COPY .docker/php-apache/playground.lisket.jp.conf /etc/apache2/sites-available/playground.lisket.jp.conf 0.0s
=> ERROR [5/9] COPY ./ ./ 0.0s
------
> [5/9] COPY ./ ./:
------
failed to prepare 19zjyzg7ed4qasgy0fn4po3bt: open /var/lib/docker/overlay2/19zjyzg7ed4qasgy0fn4po3bt/link: no space left on device
ref.
ビルドキャッシュを削除します。
$ docker system df
でDockerが使っているストレージ容量を確認する$ docker builder prune
を実行してBuild Cacheを削除$ docker builder prune
実行前。
$ docker system df
TYPE TOTAL ACTIVE SIZE RECLAIMABLE
Images 0 0 0B 0B
Containers 0 0 0B 0B
Local Volumes 0 0 0B 0B
Build Cache 680 0 18.32GB 18.32GB
$ docker builder prune
実行後
docker system df
TYPE TOTAL ACTIVE SIZE RECLAIMABLE
Images 0 0 0B 0B
Containers 0 0 0B 0B
Local Volumes 0 0 0B 0B
Build Cache 0 0 0B 0B
$ docker build
ができるようになった。