I'm beginning with Docker.
I want to run a docker mysql container, this is my docker-compose.yml
version: "3"
services:
mysql:
build: docker/mysql
ports:
- "33306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
volumes:
- "~/lab/work/attikae/sqlstorage:/var/lib/mysql"
When I run this composer being in the "work-attikae" docker-machine ( see it is ACTIVE ):
nathan@macbook-pro-de-nathan ~ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
default - virtualbox Running tcp://192.168.99.100:2376 v1.13.1
work-attikae * virtualbox Running tcp://192.168.99.103:2376 v1.13.1
The folder "~/lab/work/attikae/sqlstorage" is totally empty and nothing is written in it.
BUT ! When I am on the "Docker for mac env" ( see that none of the machines are ACTIVE ) :
nathan@macbook-pro-de-nathan ~ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
default - virtualbox Running tcp://192.168.99.100:2376 v1.13.1
work-attikae - virtualbox Running tcp://192.168.99.103:2376 v1.13.1
Everyting works properly and sql data are well written in "~/lab/work/attikae/sqlstorage".
So, I wanted to use docker-machine to train myself and use multiple ips, but ... only Docker for mac works for volumes, did I missed something ?