Search code examples
dockerdocker-composedocker-stack

Attached docker stack deploy


The docker-compose utility is attached to the terminal by default allowing you to see that's happening with all of your containers which is very convenient for development. Does the docker stack deploy command support something like this when the activity of the running containers gets rendered in one terminal in real time?


Solution

  • According to Docker website the only log displayed is:

    docker stack deploy --compose-file docker-compose.yml vossibility
    
    Ignoring unsupported options: links
    
    Creating network vossibility_vossibility
    Creating network vossibility_default
    Creating service vossibility_nsqd
    Creating service vossibility_logstash
    Creating service vossibility_elasticsearch
    Creating service vossibility_kibana
    Creating service vossibility_ghollector
    Creating service vossibility_lookupd
    

    However, there's a command which displays the logs:

    docker service logs --follow
    

    Therefore, on a Linux system you could combine both commands and you will get the desired output