dmorgan81 / rebble-docker

ISC License
15 stars 5 forks source link

Permissions error - OSError: [Errno 13] Permission denied: 'test' #5

Open clach04 opened 4 years ago

clach04 commented 4 years ago

Possibly Windows host specific:

C:\code\docker\pebble\spitemare>docker run --rm -it -v C:\code\docker\pebble\spitemare\build:/pebble dmorgan81/rebble new-project test
Traceback (most recent call last):
  File "/sdk/pebble-tool/pebble.py", line 7, in <module>
    pebble_tool.run_tool()
  File "/sdk/pebble-tool/pebble_tool/__init__.py", line 44, in run_tool
    args.func(args)
  File "/sdk/pebble-tool/pebble_tool/commands/base.py", line 47, in <lambda>
    parser.set_defaults(func=lambda x: cls()(x))
  File "/sdk/pebble-tool/pebble_tool/commands/sdk/create.py", line 163, in __call__
    _copy_from_template(template_layout, extant_path(template_paths), args.name, options)
  File "/sdk/pebble-tool/pebble_tool/commands/sdk/create.py", line 68, in _copy_from_template
    os.mkdir(project_path)
OSError: [Errno 13] Permission denied: 'test'
clach04 commented 4 years ago

Figured out out that this was caused by using a path that fixuid was not handling. In example above used /pebble. config.yml specified /work. rebble.sh handles this but if calling Docker manually (e.g. under Windows without a bourne shell) then need to ensure use same option.

docker run --rm -it -v %CD%\build:/work %IMAGE% new-project test

readme could benefit from an update to note this.