From 92ec952e9a52a237efa956ee2a00998667b5e11e Mon Sep 17 00:00:00 2001 From: KrishVora2912 Date: Tue, 13 Aug 2024 19:30:00 +0530 Subject: [PATCH] Using new gpg commands for native image too --- docker/native/Dockerfile | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/docker/native/Dockerfile b/docker/native/Dockerfile index bd84b5a48d99d..d231d8a437520 100644 --- a/docker/native/Dockerfile +++ b/docker/native/Dockerfile @@ -34,15 +34,12 @@ RUN mkdir $KAFKA_DIR; \ microdnf install wget; \ wget -nv -O kafka.tgz "$KAFKA_URL"; \ wget -nv -O kafka.tgz.asc "$KAFKA_URL.asc"; \ - for server in ha.pool.sks-keyservers.net $(shuf -e \ - hkp://p80.pool.sks-keyservers.net:80 \ - keyserver.ubuntu.com \ - hkp://keyserver.ubuntu.com:80 \ - pgp.mit.edu \ - hkp://keys.openpgp.org) ; do \ - gpg --batch --keyserver "$server" --recv-keys "$GPG_KEY" && break || : ; \ - done && \ + export GNUPGHOME="$(mktemp -d)"; \ + gpg --batch --keyserver hkp://keys.openpgp.org --recv-keys "$GPG_KEY" || \ + gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$GPG_KEY" ; \ gpg --batch --verify kafka.tgz.asc kafka.tgz; \ + gpgconf --kill all; \ + rm -rf "$GNUPGHOME" kafka.tgz.asc; \ tar xfz kafka.tgz -C $KAFKA_DIR --strip-components 1; \ rm kafka.tgz ; \ # Build the native-binary of the apache kafka using graalVM native-image.