Docker complains that bind source path doesn't exist, but it DOES

I’m trying to start a mysql container with a host directory mounted. I’m running a single-node swarm in Docker for AWS. But I can’t mount a directory…

This is the section of the docker-compose file I’m using:

  • Error running `drone exec` on Windows 10
  • Passing variable from container start to file
  • Nginx configuration for docker repos in Artifactory
  • Writing to docker volume from Dockerfile does not work
  • Unable to finding the option to set docker workspace option when running the docker image
  • How to set up docker elasticsearch with node?
  • mysql:
        image: mysql-custom
        volumes:
            - /mysql:/var/lib/mysql
        ports:
            - "3307:3306"
    

    And this is the launch command I’m trying:

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

    When I launch however, docker swarm rejects the image, saying “invalid mount config for type \”bind\”: bind source path does not exist”. However, /mysql is a valid directory, I can cd to it and everything, so why is docker saying it does not exist?

  • How to build a sidecar container for passing files from a machine outside of the Kubernetes cluster?
  • Setting up MySQL and importing dump within Dockerfile
  • Using Openblas with R in Reproducible R container
  • Issues connecting a Symfony2 app to a database container in Docker
  • hyperkube gets stuck while trying to start the API server
  • Set Docker Volume Driver opts via remote api
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.