Docker Community Forums

Share and learn in the Docker community.

MongoDB Container not working in Intellij

Hi there,

I’m using docker for windows,

When I run my simple hello world app, inside my docker image, with the configuration:

docker run --name my_mongo -p 27000:27017 mongo:latest

The container connects, and then its just code like:

{"t":{"$date":"2021-01-28T18:05:08.557+00:00"},"s":"I", "c":"INDEX", "id":20345, "ctx":"LogicalSessionCacheRefresh","msg":"Index build: done building","attr":{"buildUUID":null,"namespace":"config.system.sessions","index":"lsidTTLIndex","commitTimestamp":{"$timestamp":{"t":0,"i":0}}}}

This is where is hangs, at the end of the console it doesn’t go any further than this.
The container shows as active on the docker desktop.

I tried redownloading the mongo image again, but its just the same.

Is there something I have to add to my docker file? or is this another issue?

Thanks