Docker complains that linking the original path does not exist, but he

I am trying to start the mysql container with the host directory installed. I am running a single swarm in Docker for AWS. But I can not install the directory ...

This is the section of the file that I am using:

mysql:
    image: mysql-custom
    volumes:
        - /mysql:/var/lib/mysql
    ports:
        - "3307:3306"

And this is the start command that I am trying to execute:

docker stack deploy --compose-file docker-compose.yml stack12

When I start, however, the docker swarm rejects the image, saying "the mount configuration is incorrect for type \" bind \ ": linking the source path does not exist." However, / mysql is a valid directory, I can write everything to it, so why does the docker say that it does not exist?

+4
source share
1

, , mysql root.

mysql:
    image: mysql-custom
    volumes:
        - ./mysql:/var/lib/mysql
    ports:
        - "3307:3306"

. mysql. :

.
|__docker-compose.yml
|__mysql
   |__(Your content)
   |__(some more files)
0

Source: https://habr.com/ru/post/1680976/


All Articles