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

Update to run container as non-root user and other security updates #4

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

m4rc77
Copy link

@m4rc77 m4rc77 commented Jan 16, 2020

This pull request contains the following changes:

  • Update to run container as non-root user for security reasons.
  • Changed default port to 8080
  • Update to nginx 1.17.
  • Using https:// as default redirect target instead of http://.

This change might brake existing clients. Maybe a new release/branch is advised.

EXPOSE 80
EXPOSE 8080

USER 1000
Copy link

@wirespecter wirespecter Apr 13, 2022

Choose a reason for hiding this comment

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

I have a question. Even if you switched to a non-root user here, wouldn't nginx still be running as root in the background?

My point is: if an attacker finds a way to exploit nginx he will be root.
To avoid this: a new non-root user must be created and add user nonroot_username; in nginx conf so that nginx is not run as root too :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants