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 container image to run as non root #352

Merged
merged 1 commit into from
Oct 13, 2020

Conversation

BobyMCbobs
Copy link
Contributor

@BobyMCbobs BobyMCbobs commented Oct 10, 2020

Goal

This PR removes extra dependencies in the container image to run as a non-root user, instead defaulting all processes to run as root from the entrypoint.
This is important, as an exec's into the container image will not run as root, unlike currently.

Changes

Please describe the changes made in the pull request here.

Below you'll find a checklist. For each item on the list, check one option and delete the other.

Tests

  • Automated tests have been added
  • This PR does not require tests

Changelog

  • Entry has been added to changelog
  • This PR does not make a user-facing change

Documentation

  • Docs have been updated
  • This change does not need a documentation update

@ukutaht
Copy link
Contributor

ukutaht commented Oct 12, 2020

Thanks for the PR!

defaulting all processes to run as root from the entrypoint.

Sorry, as I understand this change is defaulting all processes to run as plausibleuser who is not root, correct?

@BobyMCbobs
Copy link
Contributor Author

Thanks for the PR!

defaulting all processes to run as root from the entrypoint.

Sorry, as I understand this change is defaulting all processes to run as plausibleuser who is not root, correct?

Currently

When the container is started, the root user hands off running Plausible code as the plausibleuser user.
This means that any commands run with docker exec will run as root in the container instead of plausibleuser.

In some environments, running any container as root is not allowed due to security implications.

To clarify

In this PR: from the entrypoint of the container, any process will be run as the user specified (plausibleuser) and nothing will run as root


References:

@ukutaht
Copy link
Contributor

ukutaht commented Oct 13, 2020

Thanks @BobyMCbobs ! 🙏

@ukutaht ukutaht merged commit 59acd4c into plausible:master Oct 13, 2020
ukutaht added a commit that referenced this pull request Oct 14, 2020
@BobyMCbobs BobyMCbobs mentioned this pull request Oct 14, 2020
6 tasks
ukutaht added a commit that referenced this pull request Oct 15, 2020
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.

2 participants