Skip to content

Fix Dockerfile by using non-root user#2693

Merged
jmhooper merged 1 commit into18F:masterfrom
adunkman:adunkman-docker-fix
Dec 17, 2018
Merged

Fix Dockerfile by using non-root user#2693
jmhooper merged 1 commit into18F:masterfrom
adunkman:adunkman-docker-fix

Conversation

@adunkman
Copy link
Contributor

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 #2690.

**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.
@adunkman
Copy link
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!

Install Code Climate Test Reporter (1)…
  fatal error: Unable to locate credentials

@jmhooper
Copy link
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

@jmhooper
Copy link
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 jmhooper merged commit 7d8272c into 18F:master Dec 17, 2018
@jmhooper
Copy link
Contributor

Done, thanks @adunkman!

@adunkman adunkman deleted the adunkman-docker-fix branch December 17, 2018 19:32
@adunkman
Copy link
Contributor Author

Woohoo! Thanks! 🎉

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