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

Docker: Use Docker's USER command to set user, to support running as non-root #174

Merged
merged 1 commit into from
Apr 16, 2021

Conversation

lfittl
Copy link
Member

@lfittl lfittl commented Apr 6, 2021

This enables the collector container to run in environments that require the
whole container to run as a non-root user, which previously was not the case.

For compatibility reasons the container can still be run as root explicitly,
in which case the setpriv command is used to drop privileges. setpriv replaces
gosu since its available for installation in most distributions directly, and
fulfills the same purpose here.


Docker tag: docker pull quay.io/pganalyze/collector:hotfix-docker-user

…non-root

This enables the collector container to run in environments that require the
whole container to run as a non-root user, which previously was not the case.

For compatibility reasons the container can still be run as root explicitly,
in which case the setpriv command is used to drop privileges. setpriv replaces
gosu since its available for installation in most distributions directly, and
fulfills the same purpose here.
Copy link
Contributor

@msakrejda msakrejda left a comment

Choose a reason for hiding this comment

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

Nice!

@msakrejda
Copy link
Contributor

Fixes #87, right?

@lfittl lfittl mentioned this pull request Apr 7, 2021
@lfittl lfittl merged commit 8e45896 into master Apr 16, 2021
@lfittl lfittl deleted the use-docker-user-and-setpriv branch April 16, 2021 20:41
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