openjournals / inara

Tools to create JOSS/JOSE publishing artifacts
MIT License
23 stars 16 forks source link

Permission denied errors when running Docker image with podman #40

Closed warrickball closed 2 months ago

warrickball commented 10 months ago

As part of a review, I tried to build the paper in this review with the inara Docker container using podman, as follows, in which I encounter a permissions error:

$ git clone --branch joss --single-branch git@github.com:tobin-wainer/elk.git
...
$ cd elk
$ podman pull docker://openjournals/inara:latest
...
$ podman run --rm --volume $PWD:/data --user $(id -u):$(id -g) --env JOURNAL=joss openjournals/inara:latest
pandoc: paper.md: openBinaryFile: permission denied (Permission denied)

If I try using the --privileged flag, I get a bit further but a similar error:

$ podman run --rm --volume $PWD:/data --user $(id -u):$(id -g) --env JOURNAL=joss --privileged openjournals/inara:latest
[INFO] Running filter /usr/local/share/openjournals/data/filters/parse-latex.lua
[INFO] Completed filter /usr/local/share/openjournals/data/filters/parse-latex.lua in 11 ms
[INFO] Running filter /usr/local/share/openjournals/data/filters/inline-cited-references.lua
[INFO] Loaded paper.bib from paper.bib
[INFO] Completed filter /usr/local/share/openjournals/data/filters/inline-cited-references.lua in 94 ms
[INFO] Running filter citeproc
[INFO] Loaded apa.csl from /usr/local/share/openjournals/apa.csl
[INFO] Completed filter citeproc in 134 ms
[INFO] Running filter /usr/local/share/openjournals/data/filters/normalize-metadata.lua
[INFO] Completed filter /usr/local/share/openjournals/data/filters/normalize-metadata.lua in 35 ms
[INFO] Running filter /usr/local/share/openjournals/data/filters/time.lua
[INFO] Completed filter /usr/local/share/openjournals/data/filters/time.lua in 15 ms
[INFO] Running filter /usr/local/share/openjournals/data/filters/normalize-author-names.lua
[INFO] Completed filter /usr/local/share/openjournals/data/filters/normalize-author-names.lua in 17 ms
[INFO] Running filter /usr/local/share/openjournals/data/filters/substitute-in-format.lua
[INFO] Completed filter /usr/local/share/openjournals/data/filters/substitute-in-format.lua in 8 ms
[INFO] Running filter /usr/local/share/openjournals/data/filters/resolve-references.lua
[INFO] Completed filter /usr/local/share/openjournals/data/filters/resolve-references.lua in 59 ms
[INFO] Running filter /usr/local/share/openjournals/data/filters/remove-references-heading.lua
[INFO] Completed filter /usr/local/share/openjournals/data/filters/remove-references-heading.lua in 9 ms
[INFO] Running filter /usr/local/share/openjournals/data/filters/orcid-uri.lua
[INFO] Completed filter /usr/local/share/openjournals/data/filters/orcid-uri.lua in 16 ms
[INFO] Not rendering RawInline (Format "latex") "\\vphantom{\\{}"
[INFO] Not rendering RawInline (Format "latex") "\\aj"
[INFO] Not rendering RawInline (Format "latex") "\\pasp"
[INFO] Not rendering RawInline (Format "latex") "\\mnras"
[INFO] Not rendering RawInline (Format "latex") "\\araa"
pandoc: paper.jats: openFile: permission denied (Permission denied)

I'm new to Docker, podman and the relationship between them, so recognise this might be me misusing something, rather than an actual issue in inara.

I'm using Fedora 38 and podman 4.7.0 from the system repositories.

tarleb commented 10 months ago

I don't know anything about podman, so I'm afraid I can't help with that. But please keep us in the loop in case there's something that can be changed on our end, or maybe we can add proper documentation for that use case when you get it working.

tarleb commented 2 months ago

I hope you were able to make it work. Since it's not clear whether this is an issue with inara, it appears best to close the issue for the time being.

matthewfeickert commented 2 months ago

Since it's not clear whether this is an issue with inara, it appears best to close the issue for the time being.

This doesn't seem like a good reason to close an Issue. :/ If ianara isn't interested in supporting podman at all that's fine, but that's a different thing.

tarleb commented 2 months ago

Supporting podman would be nice, but it looks like we won't have resources to invest in this. So if someone can contribute the necessary docs (and code if needed), then we'd gladly merge that.

We can reopen if someone feels like tackling this. Please just let us know.

warrickball commented 2 months ago

I successfully set inara up to run on my system locally, without the container, to test JOSS paper builds.

Because this no longer affects me (or probably anyone else, either), I don't mind the issue being closed.

scottstanie commented 2 months ago

Just noting that I got the same Permission Denied error the first time I ran the Docker command, but I'm not using Podman (just Docker on Ubuntu).

$  docker run --rm -it -v $PWD:/data openjournals/inara  -o pdf,crossref  paper/paper.md

When I ran the same command again, it completed successfully.