Remove $GNUPGHOME error during Dockerfile build
Change it to below and it should work all the time
export GNUPGHOME="$(mktemp -d)"; \ gpg --keyserver pgp.mit.edu --recv-keys "$GPG_KEY" || \ gpg --keyserver keyserver.pgp.com --recv-keys "$GPG_KEY" || \ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" ; \ gpg --batch --verify rabbitmq-server.tar.xz.asc rabbitmq-server.tar.xz; \ pkill -9 gpg-agent; \ pkill -9 dirmngr; \ rm -rf "$GNUPGHOME";
gpg-agent
and dirmngr
run in background and at times takes time to exist. I believe rm
picks up the files of these process and when it tries to delete the daemon and files area already gone. So adding these two pkill should remove the error