Fix Dockerfile by using non-root user#2693
Merged
jmhooper merged 1 commit into18F:masterfrom Dec 17, 2018
Merged
Conversation
**Why**: - Setting up the project with `bin/setup --docker` fails because setup commands should not be run as root. **How**: - While building the Docker image for the Rails application, create a new user and switch users to it from root. The remaining commands, including those run by `docker-compose run`, run as this new user instead of root. Fixes 18F#2690.
Contributor
Author
|
CircleCI seems to be having a credentials problem with CodeClimate — seems unrelated to these changes, but let me know if it’s related! |
Contributor
|
Hmm, yeah, that doesn't look related. Moncef managed the CodeClimate account for us so maybe something got messed up when he offboarded. I'll investigate |
Contributor
|
Ah, the problem is that we don't share environment variables with forks. Looks like the tests pass though and I wouldn't expect this to affect coverage so I'm gonna 👍 and admin merge. |
jmhooper
approved these changes
Dec 17, 2018
Contributor
|
Done, thanks @adunkman! |
Contributor
Author
|
Woohoo! Thanks! 🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why:
bin/setup --dockerfails because setup commands should not be run as root.How:
docker-compose run, run as this new user instead of root.Fixes #2690.