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
npm WARN deprecated @types/pino-pretty@5.0.0: This is a stub types definition. pino-pretty provides its own type definitions, so you do not need this installed.
npm WARN deprecated @types/pino-std-serializers@4.0.0: This is a stub types definition. pino-std-serializers provides its own type definitions, so you do not need this installed.
npm WARN checkPermissions Missing write access to /opt/safe-settings
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^2.3.2 (node_modules/jest-haste-map/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN safe-settings@0.1.0-rc.26 No description
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /opt/safe-settings
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/opt/safe-settings'
npm ERR! [Error: EACCES: permission denied, access '/opt/safe-settings'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/opt/safe-settings'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/node/.npm/_logs/2022-12-13T15_59_49_444Z-debug.log
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
The text was updated successfully, but these errors were encountered:
@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.
Problem Description
What is actually happening
When running docker-compose I get an error that the build cannot access
/opt/safe-settingswhen 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 installcommand 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
The text was updated successfully, but these errors were encountered: