簡體   English   中英

Docker Windows 10托管卷-不創建文件

[英]Docker Windows 10 hosted volume - not creating files

我正在嘗試使用以下配置文件使用docker-compose創建一個MySQL docker容器。

version: '2'

services:  
  # Name of the service as Docker will reference.
mysqlDb:

# The image, change 5.7 to any of the supported docker versions.
image: mysql:latest

# Required environment variables.  Creates a Database with a
# root user, non-root user both with passwords.
#
# MYSQL_ROOT_PASSWORD defines the root password of the root user
# MYSQL_DATABASE names the DB
# MYSQL_USER is the non-root user
# MYSQL_PASSWORD is the non-root user password
environment:
  MYSQL_ROOT_PASSWORD: "pascal01"
  MYSQL_DATABASE: "swot"

# What port do you want this MySQL instance to be available on?
# The left hand number is what port it will be available on from your machine
# perspective.  The right hand number is the post that it's linking up to.
# In this case we're saying "link our local 3306 to the docker container's 3306"
# which works here, because docker MySQL exposes the MySQL DB to the container's
# 3306 port.  If we wanted this available on port 3307 on our local machine
# we'd change this to 3307:3306
ports:
  - 3306:3306

# We're using a named volume here that docker manages for us.  This is a special
# place just for this particular dockerized MySQL instance.
volumes:
  - d:/ian/data/swot:/var/lib/mysql

當我第一次運行時,一切都很好。 在Windows 10文件夾中創建了一堆文件。 之后,我進入“ D; / ian / data / swot”窗口文件夾,並刪除了MySQL創建的所有文件。

此后,當我重新運行docker-compose進程時,它沒有在主機文件夾中創建MySQL文件。

有任何想法嗎?

找到了問題。 諾頓文件牆阻止訪問。 但是在docker容器輸出到命令行中沒有任何東西可以表明這一點。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM