Skip to content

[BUG] Buildah not running as root on self hosted runners #125

Open
@omer2500

Description

@omer2500

Version

redhat-actions/buildah-build@v2

Describe the bug

When using self hosted runner that runs ubuntu 22.04 the default user is "runner" instead of root
this causes errors related to permission to some folders and files.
although we have option to run as root user but its only when you use sudo command which is not possible with this action

for example:

Error processing tar file(exit status 1): potentially insufficient UIDs or GIDs available in user namespace (requested 0:50 for /var/local): Check /etc/subuid and /etc/subgid: lchown /var/local: invalid argument
time="2023-08-28T19:49:27Z" level=error msg="exit status 125"

and

time="2023-08-28T19:49:26Z" level=warning msg="error running newgidmap: exit status 1: newgidmap: write to gid_map failed: Operation not permitted\n"
time="2023-08-28T19:49:26Z" level=warning msg="falling back to single mapping"
time="2023-08-28T19:49:26Z" level=warning msg="error running newuidmap: exit status 1: newuidmap: write to uid_map failed: Operation not permitted\n"
time="2023-08-28T19:49:26Z" level=warning msg="falling back to single mapping"

When i run the buildah command with sudo (not part of the action)
everything is working

sudo /usr/bin/buildah bud .....

Steps to reproduce, workflow links, screenshots

Use ARC (actions controller runner) with the runner image: "summerwind/actions-runner:ubuntu-22.04"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions