Skip to content
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

feat(build): drop root privileges, update .dockerignore #3284

Merged
merged 6 commits into from
Jul 15, 2023

Conversation

suprovsky
Copy link
Contributor

@suprovsky suprovsky commented May 18, 2023

This change will prevent from using root user in order to run the application. I also updated .dockerignore so you have less files in the image. I wasn't sure if you need .git for some reason in the image so I left it inside. But if you don't need it then it should be included in .dockerignore as well.

suprovsky and others added 4 commits May 18, 2023 08:50
- Rename the user from 'app' to 'modmail', and made it a system user instead.
- Moved user creation to a higher layer in the Dockerfile.


Signed-off-by: Taku <[email protected]>
Removed LICENSE, PRIVACY.md, and SPONSORS.json from .dockerignore. Although they don't affect the functionalities of the bot, we prefer to include them due to their respective purposes.

Signed-off-by: Taku <[email protected]>
Copy link
Collaborator

@Taaku18 Taaku18 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @suprovsky, thanks for the PR.

I removed a few of the .dockerignore additions, since they should be included in the image. I also added the .git directory as suggested.
I also slightly modified the Dockerfile by renaming the user to 'modmail' and moving to a higher layer.

@Taaku18 Taaku18 added the staged Staged for next version label Jul 9, 2023
@Taaku18 Taaku18 merged commit d671998 into modmail-dev:development Jul 15, 2023
@Taaku18 Taaku18 mentioned this pull request Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
staged Staged for next version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants