-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix permission denied bug #2802
Conversation
Fixing this issue: ERROR: for greenlight-v2 Cannot start service app: OCI runtime create failed: container_linux.go:367: starting container process caused: exec: "bin/start": permission denied: unknown
this issue appear in fa_IR locale
@@ -61,5 +61,9 @@ EXPOSE 80 | |||
ARG version_code | |||
ENV VERSION_CODE=$version_code | |||
|
|||
# Set executable permission to start file | |||
USER root | |||
RUN chmod +x bin/start |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. Can we change back to the default user after making this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably yes, You can change user after set +x permission to start file.
this solution based on following link.
https://willmurphyscode.net/2017/08/16/troubleshooting-a-basic-docker-issue-getting-a-script-into-the-container/
if you read this link at the end of article he used following configs.
USER root
RUN chmod +x /start.sh
USER redis
CMD /start.sh
but in my tests, I didn't change the user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm ideally, we would do the same thing here. I'd prefer to avoid running all other commands as root
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed USER root and result was the same, You can check it.
I removed USER root and result was the same
Kudos, SonarCloud Quality Gate passed! |
Kudos, SonarCloud Quality Gate passed! |
* Fix permission denied bug Fixing this issue: ERROR: for greenlight-v2 Cannot start service app: OCI runtime create failed: container_linux.go:367: starting container process caused: exec: "bin/start": permission denied: unknown * fix persian sentence this issue appear in fa_IR locale * Remove unnecessary change user in Dockerfile I removed USER root and result was the same Co-authored-by: Ahmad Farhat <[email protected]>
* Fix permission denied bug Fixing this issue: ERROR: for greenlight-v2 Cannot start service app: OCI runtime create failed: container_linux.go:367: starting container process caused: exec: "bin/start": permission denied: unknown * fix persian sentence this issue appear in fa_IR locale * Remove unnecessary change user in Dockerfile I removed USER root and result was the same Co-authored-by: Ahmad Farhat <[email protected]>
Fixing this issue:
ERROR: for greenlight-v2 Cannot start service app: OCI runtime create failed: container_linux.go:367: starting container process caused: exec: "bin/start": permission denied: unknown
Description
Testing Steps
Screenshots (if appropriate):