Installation of system tables failed! boot2docker tutum/mysql mount file volume on Mac OS

I have trouble mounting a volume on tutum/mysql container on Mac OS.

I am running boot2docker 1.5

  • How to enable Docker API access from Windows running Docker Toolbox (docker machine)
  • Docker can not run on Windows 10 linux child system
  • Announcing your app from within a container (docker)
  • How to customize virtualbox configuration using docker-machine?
  • Docker 1.9 volumes not updating on Mac OS. Image nginx
  • Is it possible to use a mounted file in a docker file
  • When I run

    docker run -v $HOME/mysql-data:/var/lib/mysql tutum/mysql /bin/bash -c "/usr/bin/mysql_install_db"

    i get this error

    Installation of system tables failed! Examine the logs in /var/lib/mysql for more information.

    Running the above command also creates an empty $HOME/mysql-data/mysql folder.

    The tutum/mysql container runs smoothly when no mounting occurs.

    I have successfully mounted a folder on the nginx demo container, which means that the boot2docker is setup correctly for mounting volumes.

  • Spring Boot and Nginx integration
  • Scaling Docker containers in the real world
  • How to create a docker image for php and node?
  • Slow response times: Laravel 5.2 in Docker container
  • Docker random ports & AWS Elastic Load Balancer
  • Installation of chef-client(Bootstrapping) on docker container in a VM on Azure/AWS
  • One Solution collect form web for “Installation of system tables failed! boot2docker tutum/mysql mount file volume on Mac OS”

    I would guess that it’s just a permissions issue. Either find the uid of the mysql user inside the container and chown the mysql-data dir to that user, or use a data container to hold the volumes.

    For more information on data containers see the official docs.

    Also note that as the Dockerfile declares volumes, mounting is taking place whether or not you use -v argument to docker run – it just happens in a directory on the host controlled by Docker (under /var/lib/docker) instead of a directory chosen by you.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.