Closed martinm82 closed 1 year ago
@martinm82 I had the same issue. I added the following at line 8, right before USER node
:
RUN mkdir /opt/safe-settings && chown -R node:node /opt/safe-settings
@davyrod, yes indeed. That was as well one thing I did. But reading the Probot docs they actually state that one should use the node
user to run the application only. It does not state you should use it for the installation process.
But changing permissions might be indeed the better approach as there might be during runtime other permission denied errors if some files are owned by root.
@davyrod I have applied the fix and created a pull request: https://github.com/github/safe-settings/pull/384
@decyjphr could you please take a look. Thanks
@martinm82 @decyjphr Can you merge the Pull Request #384?
Problem Description
What is actually happening
When running docker-compose I get an error that the build cannot access
/opt/safe-settings
when installing the npm packages.I think the issue has been introduced with the recent root/user changes in the Dockerfile. In my opinion the fix is to run the build process as root and change only after the
npm install
command to the node user.What is the expected behavior
Building the Docker image should be successful.
Error output, if available
Context
Are you using the hosted instance of probot/settings or running your own?
self-hosted
If running your own instance, are you using it with github.com or GitHub Enterprise?
GitHub.com
Version of probot/settings
latest
Version of GitHub Enterprise