Manjaro-arm-installer on docker permission issues

I created a dockerfile so everyone could enjoy installing manjaro ARM quickly on servers,
but I’m running into permission issues:

FROM manjarolinux/base:latest
LABEL version="1.0"
LABEL maintainer="Folaht"
LABEL release-date="2021-07-19"

# Synchronize Manjaro Linux OS 
RUN pacman -Sy

# Install dependencies
RUN pacman --noconfirm -S btrfs-progs

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

# Run command on Docker launch
CMD ["manjaro-arm-installer"]
==> Proceeding....
  -> Getting package lists ready for rpi4 minimal edition...
==> Getting /dev/sdb ready with btrfs for rpi4...
Error: /dev/sdb: unrecognised disk label
mount: /var/tmp/manjaro-arm-installer/root: permission denied.
umount: /var/tmp/manjaro-arm-installer/root: must be superuser to unmount.
mount: /var/tmp/manjaro-arm-installer/root: permission denied.
mount: /var/tmp/manjaro-arm-installer/root/home: permission denied.
mount: /var/tmp/manjaro-arm-installer/boot: permission denied.

The installer requires to be run as root. Not as the docker user.

1 Like
docker run -it -u root dockerfile

Still gives me the same error

Is the command manjaro-arm-installer being run as root or with sudo?

I’m pretty sure it’s run as root.
Hang on, because I’m going to try something that didn’t work before thanks to your suggestion.


docker run -it --cap-add SYS_ADMIN dockerfile

This doesn’t work either.

  1. When I was asking the question, I was putting options after the image file like this:
docker run -it dockerfile --cap-add SYS_ADMIN

Resulting in errors.

  1. Apparently privileged gives RW access to /dev/files, while --cap-add SYS_ADMIN only RO.
docker run -it --priveliged=true dockerfile

This works.

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