nstrayer/datadrivencv

Can't produce pdf output inside a docker container

BerriJ opened this issue · 0 comments

I'm using docker for all of my projects now. Especially for a CV it seems relevant to use a reproducible environment because you usually need to update your cv seldom and large time gaps are in between the updates. However, I'm a root user inside that docker container and you can't run headless chromium as root without the --no-sandbox flag (see rstudio/pagedown#143).

That is, I suggest adding extra_args = "--no-sandbox" to render_cv.r line 22. I'll make a PR for that in a moment. I think this option shouldn't hurt anyone running R and Chrome locally but It will prevent a struggle for people heavily utilizing docker.

# Convert to PDF using Pagedown
pagedown::chrome_print(
    input = tmp_html_cv_loc,
    output = "cv.pdf",
    extra_args = "--no-sandbox"
)