Answers for "how to import docker mongo data to local mongodb"

Go
0

how to import docker mongo data to local mongodb

#! /bin/bash

mongoimport --host mongodb --db test --collection census --type json --file /mongo-seed/census.json --jsonArray
Posted by: Guest on September-13-2020
0

how to import docker mongo data to local mongodb

version: '3'
services:
  mongodb:
    image: mongo:3.2.6
    ports:
      - 27017:27017

  mongo_seed:
    image: mongo:3.2.6
    links:
      - mongodb
    volumes:
      - ./mongo-seed:/mongo-seed
    command:
      /mongo-seed/import.sh
Posted by: Guest on September-13-2020

Code answers related to "how to import docker mongo data to local mongodb"

Browse Popular Code Answers by Language