docker build -t my_image
CatDockerファイル
FROM debian:7.11
COPY sources.list /etc/apt/sources.list
#RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 46925553
ENTRYPOINT [ "tail", "-f", "/dev/null" ]
猫ソース。リスト
deb [trusted=yes] http://archive.debian.org/debian/ wheezy main contrib non-free
docker run -d my_image
debian$docker exec -ti 15c213123 /bin/sh
#apt-key list
gpg: Segmentation fault caught ... exiting
Segmentation fault
#apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 46925553
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /tmp/tmp.HhlRvZl44h --trustdb-name /etc/apt//trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyring /etc/apt/trusted.gpg.d//debian-archive-jessie-automatic.gpg --keyring /etc/apt/trusted.gpg.d//debian-archive-jessie-security-automatic.gpg --keyring /etc/apt/trusted.gpg.d//debian-archive-jessie-stable.gpg --keyring /etc/apt/trusted.gpg.d//debian-archive-squeeze-automatic.gpg --keyring /etc/apt/trusted.gpg.d//debian-archive-squeeze-stable.gpg --keyring /etc/apt/trusted.gpg.d//debian-archive-wheezy-automatic.gpg --keyring /etc/apt/trusted.gpg.d//debian-archive-wheezy-stable.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 46925553
gpg: requesting key 46925553 from hkp server keyserver.ubuntu.com
gpg: unnatural exit of external program
gpg: no handler for keyserver scheme `hkp'
gpg: keyserver receive failed: keyserver error
何してるの? !私の脳が壊れた。同じイメージがCentOSでうまく動作します。
centos$ docker exec -ti b9 /bin/sh
#apt - キーリスト
...
-----------------------------------------------------------
pub 4096R/46925553 2012-04-27 [revoked: 2019-07-01]
uid Debian Archive Automatic Signing Key (7.0/wheezy) <[email protected]>
/etc/apt/trusted.gpg.d//debian-archive-wheezy-stable.gpg
--------------------------------------------------------
...
debian$docker --version Docker バージョン 23.0.2, ビルド 569dd73
centos$ docker --version Docker バージョン 20.10.18, ビルド b40c2f6
centosで構築されたイメージはdebianで試され、結果はCentOSでうまく動作しますが、Debianでは失敗します。