Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create HTML for Puppeteer-based conversion in Docker into /tmp instead of home directory #379

Merged
merged 2 commits into from
Aug 18, 2021

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Aug 18, 2021

When trying Puppeteer-based conversion in Linux, Marp CLI will create HTML tmpfile into a home directory instead of /tmp. It is important because Chromium that is installed through snap cannot read a local file from /tmp by a snap container confinement. (#201 (comment))

However, I've found this behavior will break a workflow on Docker with MARP_USER env. Marp CLI image does not know about a specified user so os.homedir() will return a path that has no permissions for reading files by Chrome.

Thus, I changed to create HTML tmpfile into /tmp when used an official Docker image. Fix #360.

@yhatt yhatt merged commit 3920d15 into main Aug 18, 2021
@yhatt yhatt deleted the create-tmpfile-to-tmp-in-docker branch August 18, 2021 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docker image on linux still has permissions issues
1 participant