Toon Staes
Toon Staes

Reputation: 91

Docker run returning exit code 100 or 51

When I try to run my mongoDB image called database with sudo docker run -p 27017:27017 I get exitCode 100. I looked at some info online and found this about exitCode 100: Returned by mongod when the process throws an uncaught exception. I've had this issue before and was able to fix it with docker system prune --force but when i do it now I get the same exitCode.

I have tried building the image again but when I do that I either get the same exitCode or exitCode 51, of which I can't find any info online.

Any idea how I can fix this?

EDIT: I am working on an Ubuntu server vm and it has worked before.

Content of my Dockerfile:

From mongo:latest

COPY usertoevoegen.js /docker-entrypoint-initdb.d/

RUN mongod --fork  --logpath /var/log/mongodb.log --dbpath /data/db

Content of usertoevoegen.js:

db=db.getSiblingDB('admin');

db.createUser({user: "admin",pwd: "admin123",roles: [{ role: "root", db: "admin" }]});

db.createCollection("gebruiker");

db.gebruiker.insert([{"naam" : "Toon"}]);

Upvotes: 3

Views: 8405

Answers (1)

Toon Staes
Toon Staes

Reputation: 91

Apparently I didn't have enough storage left on my server which caused the error.

Upvotes: 6

Related Questions