Unable to start docker mongo image on windows

前端 未结 4 1233
攒了一身酷
攒了一身酷 2020-12-18 18:21

When starting the image I get the following error:

 2019-02-27T17:09:41.095+0000 E STORAGE  [initandlisten] WiredTiger error (17) [1551287381:95206][1:0x7fae         


        
4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-18 18:53

    WARNING (Windows & OS X): The default Docker setup on Windows and OS X uses a VirtualBox VM to host the Docker daemon. Unfortunately, the mechanism VirtualBox uses to share folders between the host system and the Docker container is not compatible with the memory mapped files used by MongoDB (see vbox bug, docs.mongodb.org and related jira.mongodb.org bug). This means that it is not possible to run a MongoDB container with the data directory mapped to the host.

    Answer from docker mongo GitHub

    Workaround to persist data:

    docker volume create --name=mongodata
    docker run -d -p 27017:27017 -v mongodata:/data/db --name=mymongo mongodb:3.3
    

    More info here

提交回复
热议问题