uses user-base to access your home dir
1.1K
Hack for running commands as your local user in a docker container, e.g.
docker run -it --rm -v $PWD:/home/user/ -e USER_ID=$(id -u) n8behavior/user-example
Then you can test it, e.g.
useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.
user@4f27934af4eb:/
$ cd
user@4f27934af4eb:~
$ touch blueberry
user@4f27934af4eb:~
$ exit
jack@jackbox:~
$ ls -l
total 48
-rw-r--r-- 1 jack jack 0 Aug 1 01:52 blueberry
drwxr-xr-x 2 jack jack 4096 Jul 28 14:36 Desktop
drwxr-xr-x 2 jack jack 4096 Jul 28 14:36 Documents
...
Content type
Image
Digest
Size
65 MB
Last updated
about 10 years ago
docker pull n8behavior/user-example