alexcheng1982/docker-magento

Unsupported config option for web: 'mysql'

Closed this issue · 1 comments

This is my first attempt at grokking docker-machine, docker-compose.yml and magento, so forgive me if this question is out of scope.

I have set up my docker instance like so:

docker-machine create -d virtualbox magento-machine
docker-machine env magento-machine
eval (docker-machine env magento-machine) fish shell
sh start.sh

# start.sh
eval $(ssh-agent)
ssh-add ~/.docker/machine/machines/magento-machine/id_rsa
rsync -avzhe ssh --relative --omit-dir-times --progress ./ docker@$(docker-machine ip magento-machine):$(pwd)
docker-compose up
#docker-compose.yml
web:
  image: alexcheng/magento
  ports:
    - "80:80"
  links:
    - mysql
  env_file:
    - env
  mysql:
    image: mysql:5.6.23
    env_file:
      - env

the result of sh start.sh is the following:

[I]  magento-machine  ~/w/magento-machine  sh start.sh                 268ms  Thu Oct 13 09:59:39 2016
Agent pid 16505
Identity added: /Users/bennyp/.docker/machine/machines/magento-machine/id_rsa (/Users/bennyp/.docker/machine/machines/magento-machine/id_rsa)
The authenticity of host 'XXX.XXX.XXX.XXX (XXX.XXX.XXX.XXX)' can't be established.
ECDSA key fingerprint is XXXXXXX.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'XXX.XXX.XXX.XXX' (ECDSA) to the list of known hosts.
building file list ... 
3 files to consider

sent 123 bytes  received 20 bytes  95.33 bytes/sec
total size is 361  speedup is 2.52
ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for web: 'mysql'

I would appreciate any guidance you're able to provide.

I see that I had a malformed docker-compose.yml. It needed to look like this:

web:
  image: alexcheng/magento
  ports:
    - "80:80"
  links:
    - mysql
  env_file:
    - env
mysql:
  image: mysql:5.6.23
  env_file:
    - env