nestybox / nestybox/sysbox

docker exec as user not working with sysbox-runc on Ubuntu 23.04 (Lunar)

Open
#699 6 comments 0 reactions 1 assignee View on GitHub

@ctalledo is already working on this.

Since Dec 6, 2024.

bug
Dominant language
Shell
Stars
3.9k
Forks
230
Avg merge
7h 48m
Merged PRs (30d)
3

Description

I've hit an issue where I'm unable to run docker exec --user for sysbox-runc containers on Ubuntu 23.04. For any user which doesn't exist in the image (but does in the container) I get the following error:

unable to find user [...]: no matching entries in passwd file

The same issue doesn't happen when using the default (runc) container runtime.

My best (semi-informed) guess is that it's somehow looking at the wrong filesystem layer and only seeing the /etc/passwd from the image.

I've written a script to reproduce the error but the manual steps are:

docker run --runtime=sysbox-runc --detach --rm --name "jammy" -t "ubuntu:jammy"
docker exec -ti "jammy" useradd execuser
docker exec -ti "jammy" cat /etc/passwd
docker exec --user "execuser" -ti "jammy" id
docker stop jammy

Environment
lsb_release:

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 23.04
Release:	23.04
Codename:	lunar

uname:

Linux lunar-amd64 6.2.0-20-generic #20-Ubuntu SMP PREEMPT_DYNAMIC Thu Apr  6 07:48:48 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

docker:

Docker version 23.0.6, build ef23cbc

sysbox:

sysbox-mgr
	edition: 	Community Edition (CE)
	version: 	0.6.1
	commit: 	ba99c0e7088f1e1ab51f95551f50de9524176655
	built at: 	Sat Apr  8 06:08:57 UTC 2023
	built by: 	Rodny Molina

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.