dockerize-me icon indicating copy to clipboard operation
dockerize-me copied to clipboard

Permission denied for writing the Dockerfile

Open khast3x opened this issue 7 years ago • 0 comments

Error

Traceback (most recent call last):
  File "/app/dockerize-me/dockerize.py", line 49, in <module>
    app_deps=app_deps
  File "/app/dockerize-me/dockerize.py", line 15, in render
    with open("/code/Dockerfile", "w") as file_handler:
IOError: [Errno 13] Permission denied: '/code/Dockerfile'

Details

The current release seems to block when trying to open the Dockerfile in /code/.
Also, the README example uses /app instead of /code.
Please see bellow to reproduce current crash using a hello-world :

root@scal:~# cd /tmp
root@scal:/tmp# git clone https://github.com/brianmyers/hello.git
Cloning into 'hello'...
remote: Counting objects: 11, done.
remote: Total 11 (delta 0), reused 0 (delta 0), pack-reused 11
Unpacking objects: 100% (11/11), done.
Checking connectivity... done.
root@scal:/tmp# cd hello/
root@scal:/tmp/hello# docker run -it --rm -v $PWD:/code fiunchinho/dockerize-me
What's your email? [email protected]
What's your name? tester
Does the container run Java? [False] 
Which file/folder needs to be copied to the container? It'll be copied into '/code' [.] 
Which port do you want to expose? [No ports exposed] 
Do you need an entrypoint to do stuff before running the app? [False] 
How do you execute your application? The code lives in '/code' python /code/hello.py
System dependencies (f.e python=2.7.11-r3 py-pip=7.1.2-r0): [None] python=2.7.11-r3 py-pip=7.1.2-r0
App dependencies command (f.e pip install -r requirements.txt): [False] 
Traceback (most recent call last):
  File "/app/dockerize-me/dockerize.py", line 49, in <module>
    app_deps=app_deps
  File "/app/dockerize-me/dockerize.py", line 15, in render
    with open("/code/Dockerfile", "w") as file_handler:
IOError: [Errno 13] Permission denied: '/code/Dockerfile'

Best regards,

khast3x avatar Feb 20 '18 03:02 khast3x