docker run --rm --link mongo_mongodb_1:mongo -v /var/www/mongo/backup/:/backup --network mongo_default mongo:3.2 bash -c 'mongorestore --db ${DATABASE_NAME} --host mongo /backup' mongo:3.2を起動して、mongo_defaultというネットワーク上にある、mongo_mongodb_1というコンテナに接続する。 ホストの/var/www/mongo/backup/ディレクトリにある、リストアデータを/backupにマウントする。 mongorestoreコマンドを実行して、終了したら、今回起動したコンテナを削除する。 オプションの説明 --rm --rm 今回走らせるdockerコンテナがexitしたときに