2017-07-21 2 views
0

Je suis en train de créer un conteneur de docker MySQL à l'aide docker-Compose, en utilisant le fichier de configuration suivante ..Docker de Windows 10 volumes hébergés - ne pas créer des fichiers

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 

Quand j'ai couru ce la première fois, tout était bien. Un tas de fichiers ont été créés dans le dossier Windows 10. Après cela, je suis entré dans le dossier 'D;/ian/data/swot' et j'ai supprimé tous les fichiers créés par MySQL. Par la suite, lorsque je relance le processus docker-composer, il ne crée PAS les fichiers MySQL dans le dossier hôte.

Des idées?

Répondre

0

a trouvé le problème. Norton Filewall bloquant l'accès. mais il n'y a rien dans la sortie du conteneur docker à la ligne de commande qui indiquerait ceci.