🐳
何も変更してないのにdocker buildでエラーになる?
エラー概要
Dockerfileを変更していないのに、
apt update
でAt least one invalid signature was encountered
のエラーが発生するようになった。
> [4/7] RUN apt update && apt install -y $(cat packages.txt):
0.127
0.127 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
0.127
0.193 Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
0.219 Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
0.231 Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
0.234 Err:1 http://deb.debian.org/debian bookworm InRelease
0.234 At least one invalid signature was encountered.
0.249 Err:2 http://deb.debian.org/debian bookworm-updates InRelease
0.249 At least one invalid signature was encountered.
0.263 Err:3 http://deb.debian.org/debian-security bookworm-security InRelease
0.263 At least one invalid signature was encountered.
原因
何度もdocker buildをデバックしていたため、ディスクがフルになっていた模様。
> df -h
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
...
/System/Volumes/Data
map auto_home 0Bi 0Bi 0Bi 100% 0 0 -
...
解決策
不要なコンテナやイメージ、キャッシュなどを削除。
> docker system prune -a
WARNING! This will remove:
- all stopped containers
- all networks not used by at least one container
- all images without at least one container associated to them
- all build cache
Are you sure you want to continue? [y/N] y
Deleted Containers:
...
Deleted Images:
....
Total reclaimed space: 55.14GB
これで解決しました🎉
Discussion