The following shows the right and wrong way to specify the environment flags. Be careful using Key: Value
format depending on the docker version.
version: "3.2"
services:
mariadb:
image: mariadb:10.5
ports:
- "3306:3306"
environment:
# MYSQL_ROOT_PASSWORD: admin
# MYSQL_DATABASE: app
# MYSQL_USER: app
# MYSQL_PASSWORD: password
- MYSQL_ROOT_PASSWORD=admin
- MYSQL_DATABASE=app
- MYSQL_USER=app
- MYSQL_PASSWORD=password