报错信息
ubuntu@ip-172-31-0-144:~/project$ yarn docker:db
yarn run v1.22.4
$ docker-compose -f docker-compose.db.yml up -d
WARNING: The DATASOURCE_USER variable is not set. Defaulting to a blank string.
WARNING: The DATASOURCE_PASSWORD variable is not set. Defaulting to a blank string.
WARNING: The DATASOURCE_DB variable is not set. Defaulting to a blank string.
WARNING: The TIME_ZONE variable is not set. Defaulting to a blank string.
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?
解决方法
// 检查状态是否正常
$ service docker status
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2020-05-29 06:28:36 UTC; 23h ago
Docs: https://docs.docker.com
Main PID: 22425 (dockerd)
Tasks: 13
CGroup: /system.slice/docker.service