Why Docker not mounted volume when you first start?

Docker-compose.
There is a MySQL service:
# ...
services:
 # MySQL
mysqldb:
 image: mysql
 container_name: '${MYSQL_HOST}'
 restart: always
environment:
 - 'MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}'
 - 'MYSQL_USER=${MYSQL_USER}'
 - 'MYSQL_PASSWORD=${MYSQL_PASSWORD}'
ports:
 - '3307:3306'
volumes:
 - './data/db/mysql:/var/lib/mysql'
# ...

When you first run docker-compose up -- the directory does not mapesa and inside the container there is no files from the host machine (BD).
On the container (docker inspect), section Mounts reports that the directory is mounted: https://i.imgur.com/c4icESp.png.
After removal of this container, and recreation -- all okay.
What could be wrong? This behavior appears only once, at initial startup Docker and until the next reboot of the host machine.

Win 10, 17.09 Docker (Docker Containers).
June 10th 19 at 14:46
0 answer

Find more questions by tags Docker