Reputation: 19
I run the below command under the docker-compose.yml folder:
docker-compose up
my "docker-compose.yml" file:
version: '3'
services:
ubuntu:
image: "ubuntu:latest"
tty: true
But the issue is:
Jianfengs-MBP:homedocker jianfengli$ docker-compose up ubuntu
Recreating homedocker_ubuntu_1 ... done
Attaching to homedocker_ubuntu_1
Engine: 18.06.1-ce Compose: 1.22.0
Upvotes: 1
Views: 4569
Reputation: 66
This is the expected behaviour. After attaching it goes to print logs, but if there are no logs then it just waits.
If you want up to exit use up docker-compose up -d
Upvotes: 2