Created
February 12, 2021 13:53
-
-
Save unfor19/91710e805314d24fcdafa7b5eea631a6 to your computer and use it in GitHub Desktop.
mind-the-uid-gid-good-sh
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
# GOOD | |
# Reminder - My machine's UID:GID is 1000:1000 | |
# frigga's user UID:GID - 1000:1000 | |
$ docker run --rm -it -v $PWD/:/code/ --workdir=/code/ --entrypoint=bash unfor19/frigga | |
appuser@52ad885a9ad5:/code$ echo "file contents" > some-file.txt | |
appuser@52ad885a9ad5:/code$ ls -lh some-file.txt | |
# -rw-r--r-- 1 appuser appgroup 28 Feb 12 14:15 some-file.txt | |
appuser@52ad885a9ad5:/code$ exit | |
# Local machine | |
$ ls -lh some-file.txt | |
# -rw-r--r-- 1 meir meir 14 Feb 12 14:16 some-file.txt | |
$ echo "more contents" >> some-file.txt | |
# success |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment