Open
Description
Step to reproduce
docker run --rm -e MONGO_INITDB_ROOT_USERNAME=root -e MONGO_INITDB_ROOT_PASSWORD=root mongo:5.0.3 mongod --shardsvr --replSet a
or
docker run --rm -e MONGO_INITDB_ROOT_USERNAME=root -e MONGO_INITDB_ROOT_PASSWORD=root mongo:5.0.3 mongod --configsvr --replSet a
Actual result
BadValue: Cannot start a shardsvr as a standalone server. Please use the option --replset to start the node as a replica set.
try 'mongod --help' for more information
Starts from 5.0.3 mongod requires replica set for shardsvr
or configsvr
cluster role (issue - https://jira.mongodb.org/browse/SERVER-27383)
It is caused by this code: https://github.com/docker-library/mongo/blob/master/5.0/docker-entrypoint.sh#L286