docker-library / docker-library/mongo

`ENTRYPOINT` documentation

Open
#686 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
1.1k
Forks
658
Avg merge
4h 40m
Merged PRs (30d)
1

Description

Would it be possible to document what the embedded ENTRYPOINT does (globally, or for each version, whichever makes sense)? Took me several hours to figure out the ECONNREFUSED was caused by me overriding ENTRYPOINT with mongod ... omitting --bind-ip and --bind-ip-all in compose.yaml.

No idea why I used entrypoint instead of command, but there I was, banging my head against the wall. It was fun though, crawling through all these posts of people desperate to connect to their database, throwing in --bind-ip-all, --connection=direct, publishing ports, without success. Or another post about this person getting their entire database contents replaced by a bitcoin ransom message because they had exposed 27017 to the outside world. I guess that's why mongo binds to localhost only by default...

What was relevant in my case, is that the embedded entrypoint (for Mongo 5.0 at least) adds --bind-ip-all if it cannot find any explicit mention of --bind-ip or --bind-ip-all in the command arguments (because, after all, if you are running in a container and you do not expose that port, what's the point). So, overriding the entrypoint means you have to explicitly add --bind-ip or --bind-ip-all to the new entrypoint.

My question is, I guess, are there other things this entrypoint does that we should be aware of? What do we miss if we set entrypoint: mongod --bind-ip-all --db-path ... --replSet rs01?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the embedded ENTRYPOINT behavior described for MongoDB 5.0 and compare what changes when compose.yaml overrides it with an entrypoint command. Document the entrypoint's relevant behavior, including bind-address handling and any other missed setup, and explain what users must preserve when overriding it.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, mongodb
Domain
databases, devops, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.