Thanks for the replies. @Vincenzo: Please find the full error at the bottom.
@Jan: I am using Debian 10 (Buster). I am switching to the solr user at the end of the dockerfile. I did not paste the whole dockerfile here but only the relevant part. It fails on that RUN instruction and does not go any further. So, I think the later part in the Dockerfile becomes irrelevant for this error. 37597 [INFO] DOCKER> Step 1/32 : FROM solr:9.2.1 37612 [INFO] DOCKER> 37615 [INFO] DOCKER> ---> 1834fb31cef8 37615 [INFO] DOCKER> Step 2/32 : USER root 37615 [INFO] DOCKER> 39769 [INFO] DOCKER> ---> Running in 923bd0b0f3c8 39959 [INFO] DOCKER> Removing intermediate container 923bd0b0f3c8 39959 [INFO] DOCKER> ---> 2b5502f09462 39967 [INFO] DOCKER> Step 3/32 : RUN apt-get update && apt-get upgrade --yes && apt-get install --yes locales 39967 [INFO] DOCKER> 40054 [INFO] DOCKER> ---> Running in b20c1b8bebbc 40416 [INFO] DOCKER> Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB] 40549 [INFO] DOCKER> Err:1 http://security.ubuntu.com/ubuntu jammy-security InRelease 40550 [INFO] DOCKER> The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C 40562 [INFO] DOCKER> Get:2 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB] 41157 [INFO] DOCKER> Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB] 41251 [INFO] DOCKER> Err:2 http://archive.ubuntu.com/ubuntu jammy InRelease 41252 [INFO] DOCKER> The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C 41361 [INFO] DOCKER> Get:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [108 kB] 41415 [INFO] DOCKER> Err:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease 41416 [INFO] DOCKER> The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C 41554 [INFO] DOCKER> Err:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease 41554 [INFO] DOCKER> The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C 41556 [INFO] DOCKER> Reading package lists... 41578 [INFO] DOCKER> 41589 [INFO] DOCKER> [91mW 41589 [INFO] DOCKER> [91m: 41593 [INFO] DOCKER> [91mhttp:// security.ubuntu.com/ubuntu/dists/jammy-security/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg are ignored as the file is not readable by user '_apt' executing apt-key. 41601 [INFO] DOCKER> [91m 41605 [INFO] DOCKER> [91mW 41605 [INFO] DOCKER> [91m: 41605 [INFO] DOCKER> [91mhttp:// security.ubuntu.com/ubuntu/dists/jammy-security/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/ubuntu-keyring-2018-archive.gpg are ignored as the file is not readable by user '_apt' executing apt-key. 41605 [INFO] DOCKER> [91m 41606 [INFO] DOCKER> [91mW 41606 [INFO] DOCKER> [91m: 41606 [INFO] DOCKER> [91mGPG error: http://security.ubuntu.com/ubuntu jammy-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C41606 [INFO] DOCKER> [91m 41606 [INFO] DOCKER> [91mE 41607 [INFO] DOCKER> [91m: 41607 [INFO] DOCKER> [91mThe repository 'http://security.ubuntu.com/ubuntu jammy-security InRelease' is not signed. 41607 [INFO] DOCKER> [91m 41607 [INFO] DOCKER> [91mW 41607 [INFO] DOCKER> [91m: 41608 [INFO] DOCKER> [91mhttp:// archive.ubuntu.com/ubuntu/dists/jammy/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg are ignored as the file is not readable by user '_apt' executing apt-key. 41613 [INFO] DOCKER> [91m 41613 [INFO] DOCKER> [91mW 41613 [INFO] DOCKER> [91m: 41613 [INFO] DOCKER> [91mhttp:// archive.ubuntu.com/ubuntu/dists/jammy/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/ubuntu-keyring-2018-archive.gpg are ignored as the file is not readable by user '_apt' executing apt-key. 41613 [INFO] DOCKER> [91m 41617 [INFO] DOCKER> [91mW 41617 [INFO] DOCKER> [91m: 41617 [INFO] DOCKER> [91mGPG error: http://archive.ubuntu.com/ubuntu jammy InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C 41623 [INFO] DOCKER> [91m E: The repository 'http://archive.ubuntu.com/ubuntu jammy InRelease' is not signed. W: http://archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg are ignored as the file is not readable by user '_apt' executing apt-key. W: http://archive.ubuntu.com/ubuntu/dists/jammy-updates/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/ubuntu-keyring-2018-archive.gpg are ignored as the file is not readable by user '_apt' executing apt-key. W: GPG error: http://archive.ubuntu.com/ubuntu jammy-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C E: The repository 'http://archive.ubuntu.com/ubuntu jammy-updates InRelease' is not signed. W: http://archive.ubuntu.com/ubuntu/dists/jammy-backports/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg are ignored as the file is not readable by user '_apt' executing apt-key. W: http://archive.ubuntu.com/ubuntu/dists/jammy-backports/InRelease: The key(s) in the keyring /etc/apt/trusted.gpg.d/ubuntu-keyring-2018-archive.gpg are ignored as the file is not readable by user '_apt' executing apt-key. W: GPG error: http://archive.ubuntu.com/ubuntu jammy-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 871920D1991BC93C E: The repository 'http://archive.ubuntu.com/ubuntu jammy-backports InRelease' is not signed. E: Problem executing scripts APT::Update::Post-Invoke 'rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true' E: Sub-process returned an error code On Thu, Jun 1, 2023 at 5:23 PM Jan Høydahl <jan....@cominvent.com> wrote: > I cannot reproduce this. Copied your Dockerfile and all succeeds > (MacBook). You should consider adding USER solr as the last line of your > file. > > Jan > > > 1. jun. 2023 kl. 18:38 skrev gnandre <arnoldbron...@gmail.com>: > > > > Hi, > > > > I am running into the following issue while creating a custom docker > image > > on top of the official Solr docker image (9.2.1). > > > > The key(s) in the keyring > > /etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg are ignored as the > > file is not readable by user '_apt' executing apt-key > > > > Because of this, it further fails with the following error message: > > > > http://archive.ubuntu.com/ubuntu jammy InRelease: The following > signatures > > couldn't be verified because the public key is not available: NO_PUBKEY > > 871920D1991BC93C > > > > It fails on the RUN step. What might be the problem? Is this a genuine > > issue with the base image? > > > > FROM solr:9.2.1 > > > > USER root > > > > RUN apt-get update && \ > > apt-get upgrade --yes && \ > > apt-get install --yes locales > >