My yaml file is as follows:
version: '2'
services:
foo:
image: ubuntu:latest
container_name: demo_ubuntu
Run command:
sudo docker-compose up -d
The container state started is exit 0, which is not a normal up state.
Seek a solution ~
Just add the start command, for example
/bin/bash