$ pwd
$ docker-compose -f "/docker/docker-compose.yml" up -d
WARNING: The DB_NAME variable is not set. Defaulting to a blank string.
WARNING: The DB_USER variable is not set. Defaulting to a blank string.
WARNING: The DB_PASS variable is not set. Defaulting to a blank string.
WARNING: The TZ variable is not set. Defaulting to a blank string.
WARNING: The DB_PORT variable is not set. Defaulting to a blank string.
ERROR: The Compose file '/docker/docker-compose.yml' is invalid because:
services.mysql.ports contains an invalid type, it should be a number, or an object
docker-compose up
に
--project-directory
を付随すれば
.env
が適用されました。