Skip to content

MongoDB 4.2 is not suitable for use as a service in Gitlab CI #390

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

Closed
romintomasetti opened this issue Feb 28, 2020 · 2 comments
Closed

Comments

@romintomasetti
Copy link

romintomasetti commented Feb 28, 2020

What's going on here?

Using the published Docker image of MongoDB (latest as of now, so 4.2.2 but I think the problem is the same with previous versions) as a service in Gitlab CI fails because the directory /home/mongodb/ is missing.

Error saving history file: FileOpenFailed: Unable to open() file /home/mongodb/.dbshell: No such file or directory

Proposed fix

See line

RUN groupadd -r mongodb && useradd -r -g mongodb mongodb

Instead, it should be:

RUN groupadd -r mongodb && useradd -r -m -g mongodb mongodb

so that the home directory is created. Tested, it seemed to fix the issue.

@wglambert
Copy link

Duplicate of #323

@wglambert wglambert marked this as a duplicate of #323 Feb 28, 2020
@romintomasetti
Copy link
Author

@wglambert Indeed, just wanted to point the fix 😄

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

No branches or pull requests

3 participants