Permission errors with a distro package inside of Docker containers #38510
-
|
Hi, I'm not quite sure how to phrase the title of this question... The issue is a mystery for me. I'm quite new to GitHub actions, so keep in mind that it could be something simple, but I am obviously missing something. For context, here is the upstream discussion in the LilyPond project: https://lists.gnu.org/archive/html/lilypond-user/2022-11/msg00062.html LilyPond is a text-based music score compiler (“LaTeX for music scores”). In short, the issue is that when trying to use LilyPond in GitHub actions, it fails if (1) the job runs in a Docker container (with The error thrown by LilyPond is The operation that leads to the last fatal error is a simple call to the C standard library In other words, it looks like the LilyPond process does not have the necessary permissions on the file system. There is a reproducer here: https://github.com/Witiko/lilypond-github-actions-example This is the action definition (there is also a small In my fork at https://github.com/Jean-Abou-Samra/lilypond-github-actions-example, you can find an action definition that shows that it doesn't work with Fedora 37 either, and that it does work with official, standalone LilyPond binaries. This issue also seems not to be reproductible in Docker containers outside of GitHub actions. Given that it doesn't work neither with the Ubuntu package, nor with the Fedora package (the latter of which I am using myself), it must be something generic, but what? What can make a difference of permissions between the distro packages and the standalone binaries on two different systems inside GitHub actions? I am pretty puzzled. Any clue? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 10 replies
-
|
You can pass the following options to make the container run as root so the necessary permissions are used |
Beta Was this translation helpful? Give feedback.
-
|
Actions does a whole lot of mounting and overriding environment variables (including Example from one of your logs: https://github.com/Jean-Abou-Samra/lilypond-github-actions-example/actions/runs/3413390980/jobs/5680044999#step:3:27 |
Beta Was this translation helpful? Give feedback.
-
|
I was able to get the build to run successful in this job. Basically, you were not refencing the newly installed instance of lilypond. the important lines are as follows The first line states install this in the official-binaries folder, so the second line should use the binaries built there! |
Beta Was this translation helpful? Give feedback.
-
|
I was able to fix the issue by adding the following option |
Beta Was this translation helpful? Give feedback.
I was able to fix the issue by adding the following option
--security-opt seccomp=unconfined, I submitted the changes as a pull request to your example repo. Please let me know if there is anything else I can do to help!