- 선행
- docker install
- mongodb tool (robomongo) install
Sample Data Download
- mongodb-sample-dataset 접속
mongodb Dockerize
docker pull mongo
docker images
- docker run mongo image file
- %cd% – mongodb-sample-dataset 를 저장한 위치 의미
docker run --rm --name mongodb-container -v %cd%:/data/db -d -p 27017:27017 mongo
docker ps
docker exec -it 9c39de3944 bash
root@9c39de39445a:/# cd /data/db
root@9c39de39445a:/data/db# ./script.sh localhost 27017
...
2022-02-12T15:38:52.798+0000 dropping: sample_training.trips
2022-02-12T15:38:53.775+0000 10000 document(s) imported successfully. 0 document(s) failed to import.
2022-02-12T15:38:53.787+0000 connected to: mongodb://localhost:27017/
2022-02-12T15:38:53.787+0000 dropping: sample_training.tweets
2022-02-12T15:38:56.787+0000 [###############.........] sample_training.tweets 30.3MB/47.6MB (63.6%)
2022-02-12T15:38:58.623+0000 [########################] sample_training.tweets 47.6MB/47.6MB (100.0%)
2022-02-12T15:38:58.624+0000 24832 document(s) imported successfully. 0 document(s) failed to import.
2022-02-12T15:38:58.637+0000 connected to: mongodb://localhost:27017/
2022-02-12T15:38:58.637+0000 dropping: sample_training.zips
2022-02-12T15:38:59.714+0000 29470 document(s) imported successfully. 0 document(s) failed to import.
sample_weatherdata
2022-02-12T15:38:59.732+0000 connected to: mongodb://localhost:27017/
2022-02-12T15:38:59.733+0000 dropping: sample_weatherdata.data
2022-02-12T15:39:02.694+0000 10000 document(s) imported successfully. 0 document(s) failed to import.
root@9c39de39445a:/data/db#
참고 자료
댓글 한 개
핑백 :