Skip to content
This repository has been archived by the owner on May 29, 2021. It is now read-only.

add mongodb-tools #18

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM alpine:edge

RUN \
apk add --no-cache mongodb && \
apk add --no-cache mongodb mongodb-tools && \
rm /usr/bin/mongoperf

VOLUME /data/db
Expand Down
8 changes: 8 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#!/bin/sh

# import any default data
FILE="/data/db/default.json"
if [ -e $FILE ]; then
echo "Importing $FILE"
mongoimport --file $FILE
fi

# Docker entrypoint (pid 1), run as root
[ "$1" = "mongod" ] || exec "$@" || exit $?

Expand Down