-
Notifications
You must be signed in to change notification settings - Fork 35
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
Issue #34 Enhance Docker Security and Best Practices #40
Conversation
Introduce a non-root user ('oba') in the OBA Dockerfile and switch to that user for improved security. This aligns with best practices for running Docker containers without superuser privileges. Ensure that the non-root user has the required permissions for the subsequent commands.
Introduce a non-root user ('oba') in the Bundler Dockerfile and switch to that user for enhanced security. Following Docker best practices reduces the risks associated with running containers as the root user. Confirm that the non-root user has the necessary permissions for the subsequent steps.
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.
These Dockerfiles will no longer work after the changes that are in this PR. It almost looks like the output of ChatGPT with the comments saying "Continue with the rest of the Dockerfile as the non-root user" in the Dockerfiles
Check it out—I made some changes |
@@ -16,8 +19,6 @@ WORKDIR /oba/libs | |||
|
|||
# OBA WAR and JAR files | |||
RUN wget "https://repo.camsys-apps.com/releases/org/onebusaway/onebusaway-transit-data-federation-webapp/${OBA_VERSION}/onebusaway-transit-data-federation-webapp-${OBA_VERSION}.war" | |||
RUN wget "https://repo.camsys-apps.com/releases/org/onebusaway/onebusaway-api-webapp/${OBA_VERSION}/onebusaway-api-webapp-${OBA_VERSION}.war" |
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.
@myselfdeepdas Removing these wget statements seems to be unintentional. Could you revert?
Superseded by #55 |
This pull request introduces improvements to enhance the security and follow best practices when running Docker containers for the OBA server and the transit data bundler.
Changes Made:
oba/Dockerfile:
bundler/Dockerfile:
Context:
The changes aim to minimize the potential security risks associated with running containers as the root user. Following best practices, we've created a dedicated non-root user for the containers, reducing the attack surface and enhancing the overall security posture.
Please review and merge these changes to ensure a more secure and reliable deployment of the OBA server and the transit data bundler containers.
Thank you!