simple-machines / ansible-aws-infra-services

Manage your AWS infrastructure and ECS tasks with two separate ansible playbooks
Apache License 2.0
24 stars 15 forks source link

dex and dstop should execute in the most recently started *running* container #54

Closed thsutton closed 7 years ago

thsutton commented 7 years ago

@simplesteph Is this what you want?

simplesteph commented 7 years ago

yes please!

thsutton commented 7 years ago
function dl { docker ps -lq; }
function dl { docker ps -lq -f "status=running"; }
simplesteph commented 7 years ago

watch out, this might break dlog. I don't know if we want dlog to also happen for exiting containers. It's pretty useful when they crash

thsutton commented 7 years ago
$ docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                     PORTS               NAMES
5466a4ca8bff        debian              "bash"              4 minutes ago       Exited (0) 4 minutes ago                       thirsty_shirley
07ec746c6633        debian              "bash"              5 minutes ago       Up 5 minutes                                   laughing_williams
143a710eabd8        debian              "bash"              5 minutes ago       Exited (0) 5 minutes ago                       romantic_brahmagupta
$ docker ps -al
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                     PORTS               NAMES
5466a4ca8bff        debian              "bash"              5 minutes ago       Exited (0) 5 minutes ago                       thirsty_shirley
$ docker ps -al -f "status=running"
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
07ec746c6633        debian              "bash"              5 minutes ago       Up 5 minutes                            laughing_williams