Import MongoDB database Docker

Assuming you followed this article when exporting/dumping your Mongo database from Docker, you can create with the below snippet. Prior to running the script, ensure that you have unzipped on your desktop:

sudo docker run -it --rm --link CONTAINER_NAME:mongo -v /home/USERNAME/Desktop/mongodump/DATABASE_NAME:/home/USERNAME/Desktop/mongodump mongo bash -c 'mongorestore --drop --db DATABASE_NAME -v --host $MONGO_PORT_27017_TCP_ADDR:$MONGO_PORT_27017_TCP_PORT /home/USERNAME/Desktop/mongodump/'

Be sure to replace USERNAME, CONTAINER_NAME and DATABASE_NAME with the appropriate details.