0

We have several machines that we want to run the same Singularity container on. As we already have a NAS mounted by every machine, we thought this would be a good place to store it without the need to think about distribution.

Initially, we put a read-only container to test it, which was successful. We then needed to install additional system packages inside the container. Thus, we build a new sandbox container directly on the NAS (we have root permission on the NAS). However, we were not able to install packages in the sandbox (the singularity shell was started with the write flag -w and root permissions) and got the following error. E.g., from starting yum update inside the sandbox:

error: cannot get shared lock on /var/lib/rpm/Packages
error: cannot open Packages index using db5 - Operation not permitted (1)
error: cannot open Packages database in /var/lib/rpm
Error: Error: rpmdb open failed

When we build the sandbox container locally on one of the machines and access it, we can install software through the package manager.

To setup we do these commands. The first builds the sandbox from the library of images. In this case AlmaLinux 8 (we also tried it with CentOS 7, but it has the same problem). Then we enter the sandbox in shell mode to install packages.

singularity build --sandbox al8.6-sandbox library://library/default/almalinux:8
singularity shell -w -B /mnt:/mnt al8.6-sandbox

What can be the cause for the error on the NAS?

2
  • Can you provide more details, such as how you created the sandbox, the permissions of the files inside, and the exact commands you ran? Commented Jan 29, 2024 at 15:01
  • Sure, see the updated question. Commented Jan 30, 2024 at 15:54

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.