Issue with Dockerfile using manjarolinux/base: failed to initialize alpm library

I’ve made this simple Dockerfile and I’d like to upload it to the docker hub…


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

# Update Manjaro Linux OS and Install dependencies
RUN yes | pacman -Syu btrfs-progs

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

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

However, while the script runs fine on my computer,
I run into the following issue on docker hub…

Step 5/7 : RUN yes | pacman -Syu btrfs-progs
---> Running in 56d1c5886ea7
e[91merror: failed to initialize alpm library
(could not find or read directory: /var/lib/pacman/)
Removing intermediate container 56d1c5886ea7
The command '/bin/sh -c yes | pacman -Syu btrfs-progs' returned a non-zero code: 255

Why am I getting this error and what to do about it?