8000 Allow passing custom UID for default user · Issue #134 · canonical/dotrun · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Allow passing custom UID for default user #134
@lorumic

Description

@lorumic

Currently, dotrun assumes the UID of the user running the command on the host to be the default one (1000). When that's not the case, this causes an ownership mismatch that disallows the default ubuntu user to do anything in the folder that is copied over to the Docker container:

michele.lorusso@canonical.com@lorumic:~/dev/ams/ui$ dotrun
Checking for dotrun image updates...
error There are no binary scripts available.                                                                                                                                                                                                  
- Yarn dependencies have changed, reinstalling

...

error Error: EACCES: permission denied, mkdir '/home/ubuntu/ui/node_modules'
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

= `yarn install` errored =
michele.lorusso@canonical.com@lorumic:~/dev/ams/ui$ dotrun exec
Checking for dotrun image updates...
error There are no binary scripts available.                                                                                                                                                                                                  

[ $ bash ] ( virtualenv `.venv` )

ubuntu@dotrun-ui-exec-1746440910:~/ui$ ll
total 480
drwxrwxr-x 10 1234567890 9876543210   4096 May  5 10:13 ./
drwxr-x---  1 ubuntu     ubuntu       4096 May  5 10:28 ../
-rw-rw-r--  1 1234567890 9876543210    276 Apr 25 10:28 .dockerignore
-rw-r--r--  1 1234567890 9876543210  17840 Apr 25 10:28 .dotrun.json

...

ubuntu@dotrun-ui-exec-1746440910:~/ui$ mkdir node_modules
mkdir: cannot create directory ‘node_modules’: Permission denied
ubuntu@dotrun-ui-exec-1746440910:~/ui$ whoami
ubuntu
ubuntu@dotrun-ui-exec-1746440910:~/ui$ id -u ubuntu
1000

Ideally, to fix this problem, dotrun should allow the user to pass a custom UID instead of the default one (1000).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0