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

Running docker containers as non-root user #415

Merged
merged 1 commit into from
Apr 9, 2018

Conversation

tettaji
Copy link
Contributor

@tettaji tettaji commented Mar 27, 2018

What this PR does / why we need it:
I've added a user to the controller and ingress-shim Dockerfiles. The processes don't need root access so I figured I might as well limit it.

Run cert-manager container as a non root user

@jetstack-bot jetstack-bot added do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 27, 2018
@munnerz
Copy link
Member

munnerz commented Mar 27, 2018

My only concern here is around glog attempting to write a log file to disk (which we don't want it to do anyway, but I know it sometimes does bad things, because glog is bad 🙃)

/ok-to-test

@jetstack-bot jetstack-bot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 27, 2018
@tettaji
Copy link
Contributor Author

tettaji commented Mar 27, 2018

That's a good point, I didn't test myself with logfiles enabled so that might fail.

@tettaji
Copy link
Contributor Author

tettaji commented Mar 28, 2018

/retest

@euank
Copy link
Contributor

euank commented Mar 28, 2018

@munnerz By default, glog logs in /tmp, and that should be an o+rwx directory, so I don't think it should cause issues. Even in a scratch container I think docker mounts a tmpfs with appropriate permissions there.

If a user configures the log-dir away from default, it seems reasonable to also expect them to correctly permission it.

@munnerz
Copy link
Member

munnerz commented Mar 28, 2018

/retest

1 similar comment
@tettaji
Copy link
Contributor Author

tettaji commented Mar 29, 2018

/retest

@tettaji
Copy link
Contributor Author

tettaji commented Mar 29, 2018

What's up with your 1.9 environment?

@kragniz
Copy link
Contributor

kragniz commented Apr 5, 2018

/test e2e v1.9

@jetstack-bot jetstack-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Apr 9, 2018
@munnerz
Copy link
Member

munnerz commented Apr 9, 2018

We were hitting some issues relating to Helm timeouts (see #429)

/lgtm
/approve

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Apr 9, 2018
@jetstack-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: munnerz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jetstack-bot jetstack-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 9, 2018
@retest-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to jetstack).
Review the full test history for this PR.
Silence the bot with an /lgtm cancel comment for consistent failures.

@jetstack-bot jetstack-bot merged commit dc82d8b into cert-manager:master Apr 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants