Created
November 25, 2021 12:18
-
-
Save kumaraish/3d2e657526a770697764b85d320d6020 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run | |
--user 0:0 | |
--env MY_USR=$(id -u) | |
--env MY_GID=$(id -g) | |
<my_image> | |
bash -c 'zypper install -l -y xyz; | |
echo "dummy:x:$MY_USR:$MY_GID:eusers:$PWD:/bin/bash" >> /etc/passwd; | |
su - dummy -c "<command-to-be-run-with-host-users-permissions>"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment