answer action

Can’t find an answer?

Make use of a qualified tutor to get the answer

Anonmyous
0
Q:

Go : how to import docker mongo data to local mongodb

Features

Go
docker-compose exec -T <name_of_mongodb_container> mongorestore --archive --gzip < dump.gz
0
#! /bin/bash

mongoimport --host mongodb --db test --collection census --type json --file /mongo-seed/census.json --jsonArray
0
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
0
Your Answer

New to Communities?

Join the community