Giter VIP home page Giter VIP logo

Comments (7)

d0ugal avatar d0ugal commented on August 15, 2024 5

I hit the same problem, to work around it I changed the container user. Note -u "node" below.

docker run -u "node" --rm -v $PWD:/home/marp/app/ -e LANG=$LANG marpteam/marp-cli pres.md --pdf

To figure this out I ran the container with a custom entry point to get shell access and see which user had permissions over /home/marp/app

$  docker run --entrypoint "sh" -it -v $PWD:/home/marp/app/ -e LANG=$LANG marpteam/marp-cli
~/app $ pwd
/home/marp/app
~/app $ ls -la
total 256
drwxr-xr-x    3 node     node          4096 Jul  2 09:06 .
drwxr-sr-x    1 marp     marp          4096 Jul  2 09:20 ..
-rw-r--r--    1 node     node           857 Jul  1 13:34 notes.txt
-rw-r--r--    1 node     node          3150 Jul  2 09:09 pres.md

from marp-cli.

pestophagous avatar pestophagous commented on August 15, 2024 3

I also just encountered this same issue. Here is another workaround:

mkdir directory_anyone_writes_to
cp Downloads/index.md ~/directory_anyone_writes_to/ # put your md file in there
chmod -R 0777 directory_anyone_writes_to/  # grant very loose permission
cd directory_anyone_writes_to/
docker run --rm --init -v $PWD:/home/marp/app/ -e LANG=$LANG marpteam/marp-cli index.md --pdf

from marp-cli.

yhatt avatar yhatt commented on August 15, 2024 1

An useful tips: https://denibertovic.com/posts/handling-permissions-with-docker-volumes/

from marp-cli.

yhatt avatar yhatt commented on August 15, 2024

It should doubt permission or owner of directories. (ls -la | grep ^d)

It's not the best answer but adding --privileged option instead of running with sudo might be help you.

from marp-cli.

yhatt avatar yhatt commented on August 15, 2024

We close this issue that has no progress for a week. Please report more information by executing the presented command if still troubling now.

from marp-cli.

d0ugal avatar d0ugal commented on August 15, 2024

It's not the best answer but adding --privileged option instead of running with sudo might be help you.

Oh, I forgot to mention in my previous comment that I tried this and it didn't help

from marp-cli.

yhatt avatar yhatt commented on August 15, 2024

If you think Marp CLI's Docker image is assigning marp user meaningless, you may send pull request.

USER marp

UPDATE: It seems to be better following Puppeteer's best practice to run in Docker. We have to research about user permission of mounted directory.

from marp-cli.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.