docker-archive / dockercloud-cli

CLI for Docker Cloud
https://cloud.docker.com/
Apache License 2.0
74 stars 40 forks source link

service/container logs don't exit when not following #37

Open refractalize opened 8 years ago

refractalize commented 8 years ago

Hi - when running docker-cloud service logs <name> (with no --follow) it will print out the logs as expected, but the process will not exit. I have to ctrl-c to get it to exit. I'm trying to automate deployment, and I want to print out logs after the deployment to show what happened in case there are issues. What I have to do now is pipe the logs to a file, let the docker-cloud process run for a few seconds, then kill it. It would be better if it just exited.

For --follow, this behaviour seems perfectly fine, but not otherwise.

Seen in version 1.0.7

ToasterTheBrave commented 8 years ago

I'm having this same issue. Seen in both docker-cloud 1.0.7 and docker-cloud 1.0.4

sunshineo commented 7 years ago

+1

vce-xx commented 7 years ago

+1

I'm resorting to this now in my CI pipeline: (docker-cloud container logs $CONTAINER) & sleep 15; kill $! 2> /dev/null || :