Fix security issue by avoiding running container as root in Dockerfile #92
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request addresses a security issue in the Dockerfile where the container was being run as the root user. Running containers as root can expose the system to vulnerabilities and is considered a security best practice to avoid.
Changes Made
Rationale
Running containers as root can be dangerous, as if the container is compromised, the attacker would have root privileges on the host. Switching to a non-root user helps mitigate risks and follows best practices for container security.
Testing
Manual verification that the container starts correctly and the application functions as expected with the new user.
Additional Notes
Please review the modified files and test the container with the new user. Feedback is appreciated, and I am available to discuss any issues or further improvements.
cc @phsmith