使用语法
docker-compose up -d nginx mysql
回应错误
ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
解决办法
启动 docker。
sudo systemctl start docker
通过运行 hello-world 映像验证 Docker Engine 是否已正确启动。
sudo docker run hello-world// 出现 Hello from Docker! 说明 docker 启动成功