Skip to content

Instantly share code, notes, and snippets.

View ThomasLeister's full-sized avatar

Thomas Leister ThomasLeister

View GitHub Profile
@ThomasLeister
ThomasLeister / map-podman-container-user-to-host-user.txt
Created January 17, 2022 09:46
Map a Podman container user to host user
#
# Use case: Podman should run a build-container.
# The build should be run by a user "builder" with UID 1000 inside the container
# Build artifacts should be shared with the host via a -v Volume.
# To make things easier, artifacts created inside the container should have the user, who started the container, as owner.
# The Container should run in "rootless" mode.
# Solution: Use --uidmap for user mapping.
#
podman run \