php:5.6-apacheコンテナで apt-get update したら公開鍵が使用できなかった

ショコラ
ショコラ

php:5.6-apacheコンテナで apt-get update したら公開鍵が使用できなかった

①apt-get update
②apt-get install debian-keyring debian-archive-keyring
③apt-get update
でキメマス。

もっさん先輩
もっさん先輩

手順

php:5.6-apacheコンテナで apt-get install する手順。

  1. PHP5.6コンテナを起動します。
docker run -it php:5.6-apache bash
  1. 1回目の apt-get アップデートします。
apt-get update

「W: There is no public key available for the following key IDs: AA8E81B4331F7F50」のワーニングを確認する。

  1. apt-get アップデートをできるようにします。
apt-get install debian-keyring debian-archive-keyring
  1. 2回目の apt-get アップデートします。
apt-get update

これで普通に apt-get install ができるようになります。

ポイントは1回目の「apt-get update」を実行してワーニングを確認するところです。

以上

シチュエーション

php:5.6-apacheコンテナで動くアプリがある。久しぶりにビルドを行ったところ、apt-get アップデートしたら公開鍵が使用できないみたいだ。

# apt-get update
Get:1 http://security.debian.org jessie/updates InRelease [44.9 kB]
Ign http://deb.debian.org jessie InRelease
Get:2 http://deb.debian.org jessie-updates InRelease [16.3 kB]
Get:3 http://deb.debian.org jessie Release.gpg [1652 B]
Get:4 http://deb.debian.org jessie Release [77.3 kB]
Get:5 http://security.debian.org jessie/updates/main amd64 Packages [992 kB]
Get:6 http://deb.debian.org jessie-updates/main amd64 Packages [20 B]
Get:7 http://deb.debian.org jessie/main amd64 Packages [9098 kB]
Fetched 10.2 MB in 9s (1130 kB/s)
Reading package lists... Done
W: There is no public key available for the following key IDs:
AA8E81B4331F7F50
Scroll to Top