问题: 为什么会出现此错误?
错误:在文件“./docker-compose.yml”中,卷“mariavolume”必须是映射而不是字符串。
我的 docker-compose 文件几乎与这个文件相同:https ://docs.docker.com/compose/wordpress/
version: '2'
services:
wordpress:
image: wordpress:latest
restart: always
depends_on:
- db
ports:
- 8080:80
environment:
WORDPRESS_DB_PASSWORD: example
WORDPRESS_DB_HOST: 3306
db:
image: mariadb
restart: always
environment:
MYSQL_ROOT_PASSWORD: example
volumes:
- maria_volume: /var/lib/mysql
volumes:
maria_volume: ~/mariadb