以前まで動作していたdocker、centos、laravel(Linuxディストリビューション内)の環境で、docker-compose up -d --build
を行うと、ネットワークにつながらなくなった為、DNSを設定する事で、ネットワークにつながったのですが、今度はGPG errorになりました。
DB用のdockerfileの
FROM mysql:8.0.28
RUN apt-get update && \
apt-get -y install locales-all # ここでエラー
エラー内容
docker-compose build --no-cache
WARN[0000] /home/realize_corporation/todokusuri/docker/docker-compose.yml: `version` is obsolete
[+] Building 2.2s (6/7) docker:default
=> [db internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 473B 0.0s
=> [db internal] load metadata for docker.io/library/mysql:8.0.28 0.0s
=> [db internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> CACHED [db 1/3] FROM docker.io/library/mysql:8.0.28 0.0s
=> [db internal] load build context 0.0s
=> => transferring context: 66B 0.0s
=> ERROR [db 2/3] RUN apt-get update && apt-get -y install locales-all 2.2s
------
> [db 2/3] RUN apt-get update && apt-get -y install locales-all:
0.261 Get:1 http://security.debian.org/debian-security buster/updates InRelease [34.8 kB]
0.275 Get:2 http://deb.debian.org/debian buster InRelease [122 kB]
0.278 Get:3 http://repo.mysql.com/apt/debian buster InRelease [22.1 kB]
0.315 Get:4 http://deb.debian.org/debian buster-updates InRelease [56.6 kB]
0.339 Get:5 http://security.debian.org/debian-security buster/updates/main amd64 Packages [595 kB]
0.367 Err:3 http://repo.mysql.com/apt/debian buster InRelease
0.367 The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B7B3B788A8D3785C
0.448 Get:6 http://deb.debian.org/debian buster/main amd64 Packages [7909 kB]
0.976 Get:7 http://deb.debian.org/debian buster-updates/main amd64 Packages [8788 B]
1.746 Reading package lists...
2.146 W: GPG error: http://repo.mysql.com/apt/debian buster InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B7B3B788A8D3785C
2.146 E: The repository 'http://repo.mysql.com/apt/debian buster InRelease' is not signed.
------
failed to solve: process "/bin/sh -c apt-get update && apt-get -y install locales-all" did not complete successfully: exit code: 100
上記を解消する為、
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B7B3B788A8D3785C
を実行致しましたが、
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B7B3B788A8D3785C
Executing: /tmp/apt-key-gpghome.6dmIdc4qcL/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys B7B3B788A8D3785C
gpg: key B7B3B788A8D3785C: "MySQL Release Engineering <[email protected]>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
上記の状態になり、GPGキーが更新されていない?様です。
1日考えましたが、解決せず、こちらご教示頂けないでしょうか?