ERROR: In file './docker-compose.yml', volume must be a mapping not a string

后端 未结 8 1832
清歌不尽
清歌不尽 2020-12-09 02:31

Question: Why do I get this error?

ERROR: In file \'./docker-compose.yml\', volume \'mariavolume\' must be a mapping not a string.

8条回答
  •  心在旅途
    2020-12-09 03:21

    I was running into the same issue as yourself and as a last act of despair I tried putting

    volumes:
      - maria_volume: /var/lib/mysql
    

    before

    environment:
      MYSQL_ROOT_PASSWORD: example
    

    I'm not sure what kind of magic applied here but in my case, it worked

    Let me know!

提交回复
热议问题