4
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

docker-compose build出来なかったから調べた件

Posted at

docke-composer build時間掛かるし、コーヒーでも飲んでたら終わるだろうって思ってたら終わってなかった・・

$ docker-compose build
Building ocroboticspagecreater
[+] Building 31.6s (9/27)                                                                                                                                                                                    
 => [internal] load build definition from Dockerfile                    

 => ERROR [ 4/22] RUN apt-get -y update
------                                                                
 > [ 4/22] RUN apt-get -y update:                                     
#8 0.696 Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]                                                                   
#8 0.791 Get:2 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]                                          
#8 0.833 Err:1 http://deb.debian.org/debian bullseye InRelease        
#8 0.833   At least one invalid signature was encountered.            
#8 0.840 Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
#8 0.892 Err:2 http://deb.debian.org/debian-security bullseye-security InRelease
#8 0.892   At least one invalid signature was encountered.
#8 0.949 Err:3 http://deb.debian.org/debian bullseye-updates InRelease
#8 0.949   At least one invalid signature was encountered.
#8 0.954 Reading package lists...
#8 0.977 W: GPG error: http://deb.debian.org/debian bullseye InRelease: At least one invalid signature was encountered.
#8 0.977 E: The repository 'http://deb.debian.org/debian bullseye InRelease' is not signed.
#8 0.977 W: GPG error: http://deb.debian.org/debian-security bullseye-security InRelease: At least one invalid signature was encountered.
#8 0.977 E: The repository 'http://deb.debian.org/debian-security bullseye-security InRelease' is not signed.
#8 0.977 W: GPG error: http://deb.debian.org/debian bullseye-updates InRelease: At least one invalid signature was encountered.
#8 0.977 E: The repository 'http://deb.debian.org/debian bullseye-updates InRelease' is not signed.
------
executor failed running [/bin/sh -c apt-get -y update]: exit code: 100
ERROR: Service 'xxxxxxxxxx' failed to build: Build failed

apt-get -y updateがなんで通らんねん??
って適当にググったらDocker imageでVolumeが埋め尽くされていることらしい・・

$ docker image prune
WARNING! This will remove all dangling images.
Are you sure you want to continue? [y/N] y
Deleted Images:
deleted: sha256:677bba134526f65e40d68a9484ba856ef5b2cfde6f6ccf334512bbfd029c80c6
deleted: sha256:b24bae40fba0d77f1a54e371c972af1bb2317b9153f1dee2790905e2f1acbc28
deleted: sha256:0a741cdf38bf69944e10904d629e4d9390ca1e340a008aa15a958ede7f6a9886
deleted: sha256:1c492451ac9f1af249b14ed9a1809f121e2
                                  〜
                             59c8bbd00fd82a24fef88f229c9287fdcc0a1e34dd50e371913
deleted: sha256:bf9b5db5ee64d73b3f768622996c5b4f826bf4eebc48ad4aba4d3ce903127f8f
deleted: sha256:b1447be47d6e6a9e454954d239d2d356cd5f646a3eaa4ad201b535106428b78d

Total reclaimed space: 6.427GB

随分削除したな・・

docker image prune

は、
https://docs.docker.jp/config/pruning.html
を見ると、

宙ぶらりんイメージ(dangling image)のみ削除します。宙ぶらりんイメージとは、タグを持たず、他のコンテナからも参照されないイメージです。宙ぶらりんイメージを削除するには、次のようにします。

というように、ぷらぷらしているイメージを削除する機能の様子。

同じ様に、コンテナのpruneもできるようなので
docker image pruneだけでは駄目な場合、こちらもやってみると良いかもですね
自分は、今回はdocker image pruneだけで事足りました。

4
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
4
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?