Docker Community Forums

Share and learn in the Docker community.

'./docker-compose.yml', service 'links' must be a mapping not an array

I’m building a custome “docker-compose.yml” file with a set of values and arrangements for my build purpose, when Issue the command “up” to initialize the build I receive the next error:

In file ‘./docker-compose.yml’, service ‘links’ must be a mapping not an array.

`php:
image: webgriffe/magento1-dev
container_name: application-container
volumes_from:

  • unison
    volumes:
  • “~/.composer:/root/.composer”
  • “~/.ssh:/root/.ssh”
    links:
  • memcached
  • mariadb
  • blackfire_agent:blackfire
    ports:
  • “80:80”
    environment:
    HOST_IP: 192.168.99.1
    APACHE_DOC_ROOT: /unison
    working_dir: /unison

unison:
image: leighmcculloch/unison
environment:

  • UNISON_VERSION=2.48.3
    ports:
  • “5000:5000”

mariadb-data:
image: tianon/true
volumes:

  • /var/lib/mysql

mariadb:
image: mariadb:10.1.10
volumes_from:

  • “mariadb-data”
    environment:
    MYSQL_ROOT_PASSWORD: p4ssw0rd

memcached:
image: memcached

blackfire_agent:
image: blackfire/blackfire
environment:

  • BLACKFIRE_SERVER_ID
  • BLACKFIRE_SERVER_TOKEN
  • BLACKFIRE_CLIENT_ID
  • BLACKFIRE_CLIENT_TOKEN`

Considering the error indications looks like is related with the next syntax block:
`links:

  • memcached
  • mariadb
  • blackfire_agent:blackfire`

Thanks in advance for your help with this issue.