Skip to content

Bind volumes don't work #38

@whamtet

Description

@whamtet

Thanks for the excellent work Alek,

Your Dockerfile changes the user from root which breaks bind volumes on docker for linux. The use case is that I output a pdf to the bind volume so I can access it from the docker host. When I run

docker run -it --entrypoint=/bin/bash -v `pwd`/tmp:/app/tmp alekzonder/docker-puppeteer
pptruser@ip-172-31-26-224:/app$ cd tmp
pptruser@ip-172-31-26-224:/app/tmp$ mkdir f
mkdir: cannot create directory ‘f’: Permission denied
pptruser@ip-172-31-26-224:/app/tmp$ ls -all .
total 8
drwxrwxr-x 2      500      500 4096 Feb 27 18:43 .
drwxr-xr-x 1 pptruser pptruser 4096 Feb 27 19:21 ..

So you see the bind volume is not owned by pptruser, therefore we cannot write files to it to share with the docker host. You might want to mention a workaround in Readme.md. If you can suggest one I'm happy to submit a PR.

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