Installing Manjaro in a docker container. Keyring Issue: A specified local key could not be updated from a keyserver

I’m trying to build a simple docker container that runs manjaro-arm-installer
on a most updated Manjaro Minimal Linux OS.

This is what I have:

# Build Manjaro-arm-installer Docker container
FROM jonathonf/manjaro:latest
LABEL version="0.1"
LABEL maintainer="Folaht"
LABEL release-date="2021-04-31"

# Install keyrings
RUN pacman-key --init
RUN pacman-key --populate archlinux
RUN pacman-key --populate manjaro
RUN pacman-key --refresh-keys
RUN yes | pacman -Sy archlinux-keyring manjaro-keyring

# Update Manjaro Linux OS
RUN pacman -Sc
RUN pacman -Syyuu
RUN pacman-mirrors --fasttrack

# Install dependencies
RUN yes | pacman -S btrfs-progs

# Install Manjaro Arm Installer
RUN yes | pacman -S manjaro-arm-installer

# Run command on Docker launch
CMD ["manjaro-arm-installer"]

And this is the error I’m getting:

...
gpg: refreshing 131 keys from hkps://hkps.pool.sks-keyservers.net
gpg: keyserver refresh failed: General error
==> ERROR: A specified local key could not be updated from a keyserver.
The command '/bin/sh -c pacman-key --refresh-keys' returned a non-zero code: 1

What am I doing wrong?

you can change hkps server with option --keyserver xxxx

gpg: refreshing 131 keys from hkp://pgp.mit.edu
gpg: keyserver refresh failed: No keyserver available
==> ERROR: A specified local key could not be updated from a keyserver.
The command '/bin/sh -c pacman-key --refresh-keys --keyserver hkp://pgp.mit.edu' returned a non-zero code: 1
gpg: public key DB323392796CA067 is 3037 days newer than the signature
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:  22  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:  22  signed:  71  trust: 0-, 0q, 0n, 22m, 0f, 0u
gpg: depth: 2  valid:  65  signed:  19  trust: 65-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2021-08-02
==> ERROR: A specified local key could not be updated from a keyserver.
The command '/bin/sh -c pacman-key --refresh-keys --keyserver hkp://pool.sks-keyservers.net' returned a non-zero code: 1

I think I should be asking for something much more general.

Fixed! I found the “official” base image.

FROM manjarolinux/base:latest
LABEL version="0.1"
LABEL maintainer="Folaht"
LABEL release-date="2021-04-31"

# Install keyrings and refresh keys
RUN yes | pacman -Sy archlinux-keyring manjaro-keyring
RUN pacman-key --init
RUN pacman-key --populate archlinux
RUN pacman-key --populate manjaro
RUN pacman-key --refresh-keys

# Update Manjaro Linux OS
RUN pacman -Sc
RUN yes | pacman -Syyuu
RUN pacman-mirrors --fasttrack

# Install dependencies
RUN yes | pacman -S btrfs-progs

# Install Manjaro Arm Installer
RUN yes | pacman -S manjaro-arm-installer

# Run command on Docker launch
CMD ["/usr/bin/manjaro-arm-installer"]

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.