Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure single UID is used inside containers #69

Merged
merged 2 commits into from
Aug 27, 2024
Merged

Ensure single UID is used inside containers #69

merged 2 commits into from
Aug 27, 2024

Conversation

henriquesimoes
Copy link
Collaborator

APT is one of the applications that assume multiple effective UIDs exist, so that it can sandbox itself. When running with ignore_chown_errors option enabled (see podman(1)), this will lead to setgroups, seteuid and setguid syscalls to fail, breaking most of apt commands.

Ensure that a single UID is used inside the containers, both at base build image (without /etc/set{u,g}id settings) and IOC runtime, especially allowing one to properly use apt.

Dockerfile Outdated Show resolved Hide resolved
base/lnls-single-uid.sh Outdated Show resolved Hide resolved
base/lnls-single-uid.sh Outdated Show resolved Hide resolved
APT uses a _apt user by default for handling its files in the
filesystem. When subuid and subgid are not set, most APT command will
fail, since setgroups, setegid and seteuid syscalls will not succeed.
Disable APT sandbox as it is not strictly required inside containers.
IOC containers do not require multiple users, and thus they are commonly
deployed without subuid and subgid to avoid creating files in volumes
mapped to the host filesystem with a uid/gid not possible to be handled
by its user outside the namespace. However, this breaks APT default
configuration due to its sandbox user `_apt`. Disable its sandbox so
that we can use APT in such deployment environments.
@ericonr ericonr merged commit 5c73638 into main Aug 27, 2024
2 checks passed
@ericonr ericonr deleted the single-uid branch August 27, 2024 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants