[Bug]: Switching user during Archlinux's pacman RUN statement fails
- Dominant language
- Swift
- Stars
- 49.9k
- Forks
- 1.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 22
Description
### I have done the following
- [x] I have searched the existing issues
- [ ] If possible, I've reproduced the issue using the 'main' branch of this project
### Steps to reproduce
1. On an existing installation from brew
2. Create an Containerfile with the following contents:
```Containerfile
FROM docker.io/library/archlinux:latest
RUN pacman -Sy --noconfirm fzf
```
3. Run `container build --arch amd64 .`
4. Observe the reproducible error from the TTY log
### Problem description
During package installation, Archlinux's pacman package manager switched to the `alpm` user. This leads to the following error:
```
[+] Building 0.2s (5/5) FINISHED
=> [resolver] fetching image...docker.io/library/archlinux:latest 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 2B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> CACHED oci-layout://docker.io/library/archlinux:latest@sha256:a9a1e6db522cf5f8018c920d035e2 0.0s
=> => resolve docker.io/library/archlinux:latest@sha256:a9a1e6db522cf5f8018c920d035e2bfbf8e39c 0.0s
=> ERROR [linux/amd64 1/2] RUN pacman -Sy --noconfirm fzf 0.2s
------
> [linux/amd64 1/2] RUN pacman -Sy --noconfirm fzf:
0.146 :: Synchronizing package databases...
0.157 error: error restricting syscalls via seccomp: 22!
0.157 error: switching to sandbox user 'alpm' failed!
0.158 error: failed to synchronize all databases (failed to retrieve some files)
------
Error: unknown: "failed to solve: process "/bin/sh -c pacman -Sy --noconfirm fzf" did not complete successfully: exit code: 1"
```
### Environment
```markdown
- OS: macOS 26.5 (25F71)
- Xcode: Xcode 26.5 (17F42)
- Container: container CLI version 0.12.3
```
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Contributor guide
Research direction
Reproduce the failure with the reported Arch Linux Containerfile and `container build --arch amd64 .` on the existing macOS installation. Trace the build path for the RUN statement, focusing on seccomp setup and switching to the `alpm` user. Done means the pacman command completes successfully without the syscall-restriction or sandbox-user errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- arch-linux, macos, swift
- Domain
- build-system, operating-systems, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 46/100