Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script for mongo 6.0 #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions run-mongo-6.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#! /usr/bin/env bash

set -euo pipefail

echo "Removing existing container..."

docker kill mongo-6 2>/dev/null || echo "Nothing to kill"

docker rm -fv mongo-6 2>/dev/null || echo "Nothing to remove"

docker run -p 27017:27017 \
--name mongo-6 \
--rm \
-d mongo:6.0

cat <<EOF

Started MongoDB 6.0 on Port 27017.

MB_MONGO_TEST_HOST=localhost MB_MONGO_TEST_PORT=27017

Connect to the database with the MongoDB shell:

docker exec -it mongo-6 mongosh

EOF