window10中docker里的mongodb无法启动的问题

window10中docker里的mongodb无法启动的问题

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2017-12-23T03:27:52.784+0000 I CONTROL  [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=8137402d10c5
2017-12-23T03:27:52.784+0000 I CONTROL [initandlisten] db version v3.6.0
2017-12-23T03:27:52.784+0000 I CONTROL [initandlisten] git version: a57d8e71e6998a2d0afde7edc11bd23e5661c915
2017-12-23T03:27:52.784+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1t 3 May 2016
2017-12-23T03:27:52.784+0000 I CONTROL [initandlisten] allocator: tcmalloc
2017-12-23T03:27:52.784+0000 I CONTROL [initandlisten] modules: none
2017-12-23T03:27:52.784+0000 I CONTROL [initandlisten] build environment:
2017-12-23T03:27:52.784+0000 I CONTROL [initandlisten] distmod: debian81
2017-12-23T03:27:52.784+0000 I CONTROL [initandlisten] distarch: x86_64
2017-12-23T03:27:52.784+0000 I CONTROL [initandlisten] target_arch: x86_64
2017-12-23T03:27:52.784+0000 I CONTROL [initandlisten] options: { net: { bindIpAll: true }, security: { authorization: "enabled" } }
2017-12-23T03:27:52.795+0000 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=478M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),
2017-12-23T03:27:52.827+0000 E STORAGE [initandlisten] WiredTiger error (1) [1513999672:827283][1:0x7fb8288d6a00], connection: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted
2017-12-23T03:27:52.831+0000 E - [initandlisten] Assertion: 28595:1: Operation not permitted src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 413
2017-12-23T03:27:52.838+0000 I STORAGE [initandlisten] exception in initAndListen: Location28595: 1: Operation not permitted, terminating
2017-12-23T03:27:52.838+0000 I NETWORK [initandlisten] shutdown: going to close listening sockets...
2017-12-23T03:27:52.838+0000 I CONTROL [initandlisten] now exiting
2017-12-23T03:27:52.838+0000 I CONTROL [initandlisten] shutting down with code:100

docker run -d -p 27017:27017 -v D:/docker/mongo:/data/db –name mongodb mongo

改为docker run -d -p 27017:27017 –name mongodb mongo

心得:少用 -v参