Public Repository

Last pushed: 2 months ago
Short Description
Short description is empty for this repo.
Full Description
N=${1:-4}

docker run -itd \
                --net hadoop \
        --cpus=4.0 \
        -m 8g \
                -v /home/idslab/thesis/mongodb/router:/root/config \
        -p 30000:27017 \
                -e "TZ=Asia/Taipei" \
                --name mongodb-router \
                --hostname mongodb-router \
                chming1016/mongodb &> /dev/null

i=1
while [ $i -lt $N ]
do
    docker run -itd \
        --net hadoop \
        --cpus=4.0 \
        -m 8g \
        -v /home/idslab/thesis/mongodb/mongodb$i:/root/config \
        -v /db/mongodb/mongodb$i/rs:/root/rs \
        -v /db/mongodb/mongodb$i/cfg:/root/cfg \
                -e "TZ=Asia/Taipei" \
        --name mongodb$i \
                --hostname mongodb$i \
        chming1016/mongodb &> /dev/null
    i=$(( $i + 1 ))
done
Docker Pull Command
Owner
chming1016

Comments (0)