-
Notifications
You must be signed in to change notification settings - Fork 140
Closed
Labels
bugSomething isn't workingSomething isn't workingstaleIssues inactives for a while (automatically)Issues inactives for a while (automatically)
Milestone
Description
Expected Behavior
Commands can write to the home directory of docker
(~
, /home/docker
), e.g. ~/.cache
.
Current Behavior
There are permission errors, .e.g in Yarn:
yarn run v1.22.5
warning Skipping preferred cache folder "/home/docker/.cache/yarn" because it is not writable.
warning Selected the next writable cache folder in the list, will be "/tmp/.yarn-cache-1001".
Possible Solution
Update the owner ID of /home/docker
in the image entrypoint.
Steps to Reproduce (for bugs)
- Have a host user with an ID different from
1000
- Start a container, e.g. PHP-FPM
- Run a command or interactive shell
- Try to write to
/home/docker
Context
I noticed this with a Yarn installation.
The owner of /home/docker
is left at 1000
:
$ ls -ld ~
drwxr-xr-x 1 1000 docker 4096 Apr 11 06:00 /home/docker
However, the ID of the docker
user was updated to reflect my host user:
$ id
uid=1001(docker) gid=1000(docker) groups=1000(docker),27(sudo)
Your Environment
- Version used: thecodingmachine/php:8.0-v4-fpm-node14
- Operating System and version:
Distributor ID: Debian Description: Debian GNU/Linux 11 (bullseye) Release: 11 Codename: bullseye
- Link to your project: private
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingstaleIssues inactives for a while (automatically)Issues inactives for a while (automatically)