containerd / containerd/nerdctl

Expose `--uidmap` and `--gidmap` options in `run` command

Open
#2,020 2 comments 0 reactions 0 assignees View on GitHub
kind/feature
Dominant language
Go
Stars
10.4k
Forks
826
Avg merge
1d 23h
Merged PRs (30d)
44

Description

### What is the problem you're trying to solve

Almost every container image is constructed with the requirement that the user within the container be the pre-defined one, which is usually UID=1000.
When the user on the host system is not UID=1000 (almost every corporate system, and many personal ones), it is often still necessary for the calling user's UID to be mapped into the container's namespace as UID 1000 so it matches the permissions and settings the container image was created with (presuming `--privileged` is also used).

### Describe the solution you'd like

Add support for the `--uidmap` and `--gidmap` options to the `nerdctl run` sub-command, matching what `ctr` and `podman` already have.

### Additional context

The `--user` option does NOT do this. That option instead changes the user used within the container namespace rather than allowing mapping to an existing one. At best this can be used with `--privileged` to allow setting which host-system UID to use _instead_ of the one the container image was built and designed for.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.