dalibo / pandocker

🐳 A simple docker image for pandoc with filters, templates, fonts, and the latex bazaar
https://hub.docker.com/r/dalibo/pandocker/
BSD 3-Clause "New" or "Revised" License
145 stars 23 forks source link

openBinaryFile: does not exist when using alias #111

Closed gabrielziegler3 closed 5 years ago

gabrielziegler3 commented 5 years ago

I get the exception:

pandoc: "filename": openBinaryFile: does not exist (No such file or directory)

when using the alias pandoc described in the readme.

pandoc file.md

I put alias pandoc="docker run --rm -u `id -u`:`id -g` -v `pwd`:/pandoc dalibo/pandocker"` in my `~/.zshrc and the alias always give me this exception.

The exception happens in both ZSH and Bash for me. I am using Manjaro 5.2.11 and ZSH 5.7.1

daamien commented 5 years ago

Hi @gabrielziegler3 !

Thanks for this feedback.

At first grlance, it looks like docker did not mount the volume and therefore pandoc cannot see you file. There might be several reasons for that, here a few ideas to try:

daamien commented 5 years ago

Hi @gabrielziegler3 !

Any update on this ?

gabrielziegler3 commented 5 years ago

I'm not aware if I have SElinux enforced in my system, I have never used it. Can it be enforced in my system even though I haven't configured it?

I can mount volumes using the very same command when using other docker images.

gabrielziegler3 commented 5 years ago

Indeed adding --privileged to my alias command worked! I am sorry for the confusion, I wasn't aware of SELinux.

Thank you!

EDIT:

Do NOT use double quotes for your aliases as this will make pwd not work properly. Instead, stick with the single quotes. https://unix.stackexchange.com/a/303675/279215

daamien commented 5 years ago

@gabrielziegler3 : This is a very common problem. I added a FAQ for this kind of errors.

Have a nice day !