无法使用 linux 文件系统在 docker for windows 中运行 mongoDb 容器 [英] unable to run a mongoDb container in docker for windows using linux file system

查看:29
本文介绍了无法使用 linux 文件系统在 docker for windows 中运行 mongoDb 容器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 Windows 中运行一个 mongo db 容器,并将卷映射到 Windows 文件夹.

I am trying to run a mongo db container in windows with a volume mapping to a windows folder.

我在 this 中遵循了 babak 的回答问题.该文件夹映射正确,但它创建了许多名为 WiredTiger.wt.1 的文件,其中末尾的数字不断增加.

I have followed the answer by babak in this question. The folder maps properly, but it creates lots of files named WiredTiger.wt.1 where the number at the end keeps incrementing.

我在日志中看到以下几行:

I get the following lines in the log:

2020-06-12T12:49:11.431+0000 I  STORAGE  [initandlisten] WiredTiger message unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.13233

2020-06-12T12:49:11.433+0000 E  STORAGE  [initandlisten] WiredTiger error (1) [1591966151:433603][1:0x7ff261e16b00], connection: __posix_open_file, 667: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted Raw: [1591966151:433603][1:0x7ff261e16b00], connection: __posix_open_file, 667: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted

2020-06-12T12:49:11.448+0000 E  STORAGE  [initandlisten] WiredTiger error (17) [1591966151:448092][1:0x7ff261e16b00], connection: __posix_open_file, 667: /data/db/WiredTiger.wt: handle-open: open: File exists Raw: [1591966151:448092][1:0x7ff261e16b00], connection: __posix_open_file, 667: /data/db/WiredTiger.wt: handle-open: open: File exists

2020-06-12T12:49:11.473+0000 I  STORAGE  [initandlisten] WiredTiger message unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.13234

2020-06-12T12:49:11.475+0000 E  STORAGE  [initandlisten] WiredTiger error (1) [1591966151:475038][1:0x7ff261e16b00], connection: __posix_open_file, 667: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted Raw: [1591966151:475038][1:0x7ff261e16b00], connection: __posix_open_file, 667: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted

2020-06-12T12:49:11.477+0000 W  STORAGE  [initandlisten] Failed to start up WiredTiger under any compatibility version.

2020-06-12T12:49:11.477+0000 F  STORAGE  [initandlisten] Reason: 1: Operation not permitted

2020-06-12T12:49:11.477+0000 F  -        [initandlisten] Fatal Assertion 28595 at src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 915

有人知道如何解决这个问题吗?

Does anyone know how to resolve this?

谢谢,
保罗

推荐答案

对于我来说,这样的 docker-compose.yml 让 mongo 开始工作:

As for me, such docker-compose.yml makes mongo start working:

version: '3.3'
services:
  mongodb:
    image: mongo
    container_name: mongodb
    volumes:
      - mongodata:/data/db
    ports:
      - 27017:27017
volumes:
  mongodata:

这篇关于无法使用 linux 文件系统在 docker for windows 中运行 mongoDb 容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆