I'd like to create script, that downloads and GPG-verifies files to my docker image. From apache docs I see, that for verification, I need to do:
gpg --import KEYS
gpg --verify downloaded_file.tgz.asc downloaded_file.tgz
I'd like to ommit the first step as it changes "some files somewhere". The reason here is I'd like to keep the docker image as-untouched-as-possible. I'd prefer simply calling something like: gpg --using-keys KEYS --verify file.tgz.asc file.tgz
. Is it possible?
I've tried using --no-default-keyring --keyring KEYS
as mentioned here, but I can't interpret the output correctly (it prints Can't check signature: public key not found
. When I remove the --no-default-keyring
the output seems fine, but I've previously imported the KEYS file and don't know how to unimport it to see the clear result).
The KEYS, .tgz and .tgz.asc files are from Apache Kafka.