У меня есть следующий docker-compose
файл:
version: "3"
services:
#
# APIs
#----------------------------------------------
pokerstats:
image: pokerstats
container_name: pokerstats
ports:
- 8080:8080
depends_on:
- db
#
# Utilities
#----------------------------------------------
db:
image: mongo
container_name: mongo
volumes:
- ./data/db:/data/db
ports:
- "27018:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: admin
MONGO_INITDB_DATABASE: pokerStats
До того, как я добавил volumes
, все работало нормально. Однако не тогда, когда я запускаю: docker-compose up -d
контейнер mon go немедленно останавливается, и в логах я вижу ошибку:
2020-04-10T19:17:17.313+0000 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=1457M,cache_overflow=(file_max=0M),session_max=33000,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,close_scan_interval=10,close_handle_minimum=250),statistics_log=(wait=0),verbose=[recovery_progress,checkpoint_progress],
2020-04-10T19:17:17.772+0000 E STORAGE [initandlisten] WiredTiger error (1) [1586546237:772524][29:0x7fe9f284fb00], connection: __posix_open_file, 667: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted Raw: [1586546237:772524][29:0x7fe9f284fb00], connection: __posix_open_file, 667: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted
2020-04-10T19:17:17.784+0000 E STORAGE [initandlisten] WiredTiger error (17) [1586546237:784001][29:0x7fe9f284fb00], connection: __posix_open_file, 667: /data/db/WiredTiger.wt: handle-open: open: File exists Raw: [1586546237:784001][29:0x7fe9f284fb00], connection: __posix_open_file, 667: /data/db/WiredTiger.wt: handle-open: open: File exists
2020-04-10T19:17:17.785+0000 I STORAGE [initandlisten] WiredTiger message unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.1
2020-04-10T19:17:17.788+0000 E STORAGE [initandlisten] WiredTiger error (1) [1586546237:788283][29:0x7fe9f284fb00], connection: __posix_open_file, 667: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted Raw: [1586546237:788283][29:0x7fe9f284fb00], connection: __posix_open_file, 667: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted
2020-04-10T19:17:17.799+0000 E STORAGE [initandlisten] WiredTiger error (17) [1586546237:799215][29:0x7fe9f284fb00], connection: __posix_open_file, 667: /data/db/WiredTiger.wt: handle-open: open: File exists Raw: [1586546237:799215][29:0x7fe9f284fb00], connection: __posix_open_file, 667: /data/db/WiredTiger.wt: handle-open: open: File exists
2020-04-10T19:17:17.801+0000 I STORAGE [initandlisten] WiredTiger message unexpected file WiredTiger.wt found, renamed to WiredTiger.wt.2
2020-04-10T19:17:17.803+0000 E STORAGE [initandlisten] WiredTiger error (1) [1586546237:803211][29:0x7fe9f284fb00], connection: __posix_open_file, 667: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted Raw: [1586546237:803211][29:0x7fe9f284fb00], connection: __posix_open_file, 667: /data/db/WiredTiger.wt: handle-open: open: Operation not permitted
2020-04-10T19:17:17.805+0000 W STORAGE [initandlisten] Failed to start up WiredTiger under any compatibility version.
2020-04-10T19:17:17.806+0000 F STORAGE [initandlisten] Reason: 1: Operation not permitted
2020-04-10T19:17:17.806+0000 F - [initandlisten] Fatal Assertion 28595 at src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 860
Как я могу решить эту проблему? Мне нужен том mon go, который сохранит мои данные в сохраненном состоянии, если контейнер выйдет из строя.
Редактировать: для справки я запускаю docker desktop 2.2.0.3
на машине Windows 10 Pro
.