Skip to content

Build command cannot be used as non-root (linux) #2

Description

@konradkonrad

On linux, directories that are created inside a docker mount will not map back the owner to the host-user. I.e. when running

codekoala/sencha app build

which is done as user root, the resulting build-files/directories will be owned by root. Usually the fix would be to run the container with

--user $(id -u):$(id -g)

but unfortunately this is not supported by the codekoala/sencha container:

docker run --rm -v $(pwd):/code --workdir /code --user 1001:1001 codekoala/sencha:6 app build
Sencha Cmd v6.0.2.14
[INF] Processing Build Descriptor : default
[ERR] Cannot find file: /opt/Sencha/Cmd/repo/.sencha/codegen.json
make: *** [sencha] Error 65

From my understanding on Darwin/OSX and Win, due to the way docker is started inside virtualbox, an active UID-mapping for mounts,

root <-> current user

takes place, so this is not an issue for other OS than Linux.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions