Comments (7)
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.
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.
An useful tips: https://denibertovic.com/posts/handling-permissions-with-docker-volumes/
from marp-cli.
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.
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.
It's not the best answer but adding
--privileged
option instead of running withsudo
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.
If you think Marp CLI's Docker image is assigning marp
user meaningless, you may send pull request.
Line 25 in e79afe2
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)
- The latest Docker image fails PDF rendering (`Protocol error (Page.printToPDF): printing failed`)
- Add support for `lang` directive HOT 3
- `Failed converting Markdown. (Protocol error (Target.setDiscoverTargets): Target closed.)` in AWS ECS HOT 14
- Generation of PDF failed with too much latex formulas HOT 2
- Marp crashes with NodeJS LTS 18.18.0 HOT 3
- The coloring of CLI output is not accessible HOT 1
- Transparent background does not work when outputting in png format HOT 2
- Unable to launch marp if a subdirectory or file is not readable HOT 1
- marp stuck a long time without any output HOT 7
- Greek characters in path HOT 3
- Marp and inotifywait HOT 2
- Keyboard shortcuts for moving quickly inside the presentation HOT 2
- Experiment: File conversions using Firefox through WebDriver BiDi
- Server Mode Auto-refresh Does Not Work in Docker HOT 3
- Different styling in HTML and PDF HOT 2
- Investigate about Node.js single executable applications HOT 1
- Add HTML head meta icon customization HOT 1
- Cache issue with ?pdf HOT 3
- [Bespoke transitions] Compatibility with Safari
- marp.exe rendering and watch mode do not work in msys on Windows 10 (i.e. git-bash) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from marp-cli.