Skip to content

Commit b907323

Browse files
committed
Add comment about keyFile with docs link; apply to all entrypoints
1 parent b848b8d commit b907323

File tree

5 files changed

+14
-0
lines changed

5 files changed

+14
-0
lines changed

3.6/docker-entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,9 @@ if [ "$originalArgOne" = 'mongod' ]; then
268268
# remove "--auth" and "--replSet" for our initial startup (see https://docs.mongodb.com/manual/tutorial/enable-authentication/#start-mongodb-without-access-control)
269269
# https://github.com/docker-library/mongo/issues/211
270270
_mongod_hack_ensure_no_arg --auth "${mongodHackedArgs[@]}"
271+
# "keyFile implies security.authorization"
272+
# https://docs.mongodb.com/manual/reference/configuration-options/#mongodb-setting-security.keyFile
273+
_mongod_hack_ensure_no_arg_val --keyFile "${mongodHackedArgs[@]}"
271274
if [ "$MONGO_INITDB_ROOT_USERNAME" ] && [ "$MONGO_INITDB_ROOT_PASSWORD" ]; then
272275
_mongod_hack_ensure_no_arg_val --replSet "${mongodHackedArgs[@]}"
273276
fi

4.0/docker-entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,9 @@ if [ "$originalArgOne" = 'mongod' ]; then
268268
# remove "--auth" and "--replSet" for our initial startup (see https://docs.mongodb.com/manual/tutorial/enable-authentication/#start-mongodb-without-access-control)
269269
# https://github.com/docker-library/mongo/issues/211
270270
_mongod_hack_ensure_no_arg --auth "${mongodHackedArgs[@]}"
271+
# "keyFile implies security.authorization"
272+
# https://docs.mongodb.com/manual/reference/configuration-options/#mongodb-setting-security.keyFile
273+
_mongod_hack_ensure_no_arg_val --keyFile "${mongodHackedArgs[@]}"
271274
if [ "$MONGO_INITDB_ROOT_USERNAME" ] && [ "$MONGO_INITDB_ROOT_PASSWORD" ]; then
272275
_mongod_hack_ensure_no_arg_val --replSet "${mongodHackedArgs[@]}"
273276
fi

4.2/docker-entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,9 @@ if [ "$originalArgOne" = 'mongod' ]; then
268268
# remove "--auth" and "--replSet" for our initial startup (see https://docs.mongodb.com/manual/tutorial/enable-authentication/#start-mongodb-without-access-control)
269269
# https://github.com/docker-library/mongo/issues/211
270270
_mongod_hack_ensure_no_arg --auth "${mongodHackedArgs[@]}"
271+
# "keyFile implies security.authorization"
272+
# https://docs.mongodb.com/manual/reference/configuration-options/#mongodb-setting-security.keyFile
273+
_mongod_hack_ensure_no_arg_val --keyFile "${mongodHackedArgs[@]}"
271274
if [ "$MONGO_INITDB_ROOT_USERNAME" ] && [ "$MONGO_INITDB_ROOT_PASSWORD" ]; then
272275
_mongod_hack_ensure_no_arg_val --replSet "${mongodHackedArgs[@]}"
273276
fi

4.4/docker-entrypoint.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ if [ "$originalArgOne" = 'mongod' ]; then
268268
# remove "--auth" and "--replSet" for our initial startup (see https://docs.mongodb.com/manual/tutorial/enable-authentication/#start-mongodb-without-access-control)
269269
# https://github.com/docker-library/mongo/issues/211
270270
_mongod_hack_ensure_no_arg --auth "${mongodHackedArgs[@]}"
271+
# "keyFile implies security.authorization"
272+
# https://docs.mongodb.com/manual/reference/configuration-options/#mongodb-setting-security.keyFile
271273
_mongod_hack_ensure_no_arg_val --keyFile "${mongodHackedArgs[@]}"
272274
if [ "$MONGO_INITDB_ROOT_USERNAME" ] && [ "$MONGO_INITDB_ROOT_PASSWORD" ]; then
273275
_mongod_hack_ensure_no_arg_val --replSet "${mongodHackedArgs[@]}"

docker-entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,9 @@ if [ "$originalArgOne" = 'mongod' ]; then
268268
# remove "--auth" and "--replSet" for our initial startup (see https://docs.mongodb.com/manual/tutorial/enable-authentication/#start-mongodb-without-access-control)
269269
# https://github.com/docker-library/mongo/issues/211
270270
_mongod_hack_ensure_no_arg --auth "${mongodHackedArgs[@]}"
271+
# "keyFile implies security.authorization"
272+
# https://docs.mongodb.com/manual/reference/configuration-options/#mongodb-setting-security.keyFile
273+
_mongod_hack_ensure_no_arg_val --keyFile "${mongodHackedArgs[@]}"
271274
if [ "$MONGO_INITDB_ROOT_USERNAME" ] && [ "$MONGO_INITDB_ROOT_PASSWORD" ]; then
272275
_mongod_hack_ensure_no_arg_val --replSet "${mongodHackedArgs[@]}"
273276
fi

0 commit comments

Comments
 (0)