{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/10897","labels_url":"https://api.github.com/repos/docker/docker/issues/10897/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/10897/comments","events_url":"https://api.github.com/repos/docker/docker/issues/10897/events","html_url":"https://github.com/docker/docker/issues/10897","id":58217267,"number":10897,"title":"docker ps -aq --filter \"name=rancher\" >> what is the logic? ","user":{"login":"feliksik","id":8527652,"avatar_url":"https://avatars.githubusercontent.com/u/8527652?v=3","gravatar_id":"","url":"https://api.github.com/users/feliksik","html_url":"https://github.com/feliksik","followers_url":"https://api.github.com/users/feliksik/followers","following_url":"https://api.github.com/users/feliksik/following{/other_user}","gists_url":"https://api.github.com/users/feliksik/gists{/gist_id}","starred_url":"https://api.github.com/users/feliksik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/feliksik/subscriptions","organizations_url":"https://api.github.com/users/feliksik/orgs","repos_url":"https://api.github.com/users/feliksik/repos","events_url":"https://api.github.com/users/feliksik/events{/privacy}","received_events_url":"https://api.github.com/users/feliksik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-02-19T14:48:28Z","updated_at":"2015-02-19T16:37:26Z","closed_at":null,"body":"issue #8959 seems to suggest that it would be legal to filter on container name: \r\n docker ps -aq --filter \"name=rancher\" \r\n\r\nIt *seems* to work in some cases, but I miss the logic in the following. This is my list of containers: \r\n\r\n```\r\ndocker ps -a\r\nCONTAINER ID        IMAGE                            COMMAND                CREATED             STATUS                        PORTS                                          NAMES\r\n98d2b421d29c        ubuntu:14.04.1                   \"/bin/bash\"            6 hours ago         Up 3 hours                                                                   fdd4ebde-59af-4491-a42c-097e044e30aa   \r\n5672a1095b9a        rancher/agent-instance:v0.1.0    \"/etc/init.d/agent-i   6 hours ago         Up 3 hours                    0.0.0.0:500->500/udp, 0.0.0.0:4500->4500/udp   45f97b1e-5b0c-436a-8836-0241fd8567e2   \r\n2010ca4a02fb        rancher/agent:v0.3.2             \"/run.sh run\"          6 hours ago         Exited (137) 36 minutes ago                                                  rancher-agent                          \r\n5654bcdbd588        rancher/agent:v0.3.2             \"/run.sh upgrade-sta   6 hours ago         Exited (0) 6 hours ago                                                       ecstatic_wozniak                       \r\na7cd9f25f3cc        rancher/agent:v0.3.2             \"/run.sh upgrade\"      6 hours ago         Exited (-1) 6 hours ago                                                      prickly_pike                           \r\n9284eac5047f        rancher/agent:latest             \"/run.sh run\"          6 hours ago         Exited (-1) 6 hours ago                                                      desperate_ritchie                      \r\nf74766747ceb        rancher/agent:latest             \"/run.sh register\"     6 hours ago         Exited (0) 6 hours ago                                                       compassionate_fermat                   \r\n879b626f1c24        rancher/agent:latest             \"/run.sh state\"        6 hours ago         Exited (0) 6 hours ago                                                       rancher-agent-state                    \r\n5884424f695e        rancher/agent:latest             \"/run.sh http://loca   6 hours ago         Exited (1) 6 hours ago                                                       elated_brattain                        \r\nb2617f69275e        rancher/server:beta              \"/usr/share/cattle/c   6 hours ago         Up 3 hours                    0.0.0.0:8080->8080/tcp                         grave_wilson                           \r\n6ff50bb6570c        extellisys/apt-cacher-ng:0.1.0   \"/bin/sh -c '/usr/sb   2 days ago          Up About an hour              0.0.0.0:3142->3142/tcp                         apt-cacher-ng                          \r\n0e3dd97d866f        tutum/grafana:latest             \"/run.sh\"              5 days ago          Exited (-1) 2 days ago                                                       grafana                                \r\n53edefb7b786        extellisys/apt-cacher-ng:0.1.0   \"/bin/sh -c '/usr/sb   7 days ago          Exited (128) 2 days ago                                                      thirsty_babbage                        \r\n10e66481f63d        registry:latest                  \"docker-registry\"      10 days ago         Up About an hour              0.0.0.0:5000->5000/tcp                         registry-mirror                        \r\n```\r\n\r\nI would expect 879b626f1c24 and 2010ca4a02fb to show up in the filter for name=rancher. However: \r\n\r\n```\r\n$ docker ps -a --filter=\"name=rancher\"\r\nCONTAINER ID        IMAGE                  COMMAND                CREATED             STATUS                        PORTS               NAMES\r\n2010ca4a02fb        rancher/agent:v0.3.2   \"/run.sh run\"          6 hours ago         Exited (137) 37 minutes ago                       rancher-agent         \r\n5654bcdbd588        rancher/agent:v0.3.2   \"/run.sh upgrade-sta   6 hours ago         Exited (0) 6 hours ago                            ecstatic_wozniak      \r\na7cd9f25f3cc        rancher/agent:v0.3.2   \"/run.sh upgrade\"      6 hours ago         Exited (-1) 6 hours ago                           prickly_pike          \r\n879b626f1c24        rancher/agent:latest   \"/run.sh state\"        6 hours ago         Exited (0) 6 hours ago                            rancher-agent-state   \r\n```\r\nif the filtered thing would also search on Image name, I would expect even more than 4 results, so I really do not see the logic. Is this a bug? \r\n\r\nI am using Docker version 1.5.0, build a8a31ef"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/75085209","html_url":"https://github.com/docker/docker/issues/10897#issuecomment-75085209","issue_url":"https://api.github.com/repos/docker/docker/issues/10897","id":75085209,"user":{"login":"aanm","id":5714066,"avatar_url":"https://avatars.githubusercontent.com/u/5714066?v=3","gravatar_id":"","url":"https://api.github.com/users/aanm","html_url":"https://github.com/aanm","followers_url":"https://api.github.com/users/aanm/followers","following_url":"https://api.github.com/users/aanm/following{/other_user}","gists_url":"https://api.github.com/users/aanm/gists{/gist_id}","starred_url":"https://api.github.com/users/aanm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aanm/subscriptions","organizations_url":"https://api.github.com/users/aanm/orgs","repos_url":"https://api.github.com/users/aanm/repos","events_url":"https://api.github.com/users/aanm/events{/privacy}","received_events_url":"https://api.github.com/users/aanm/received_events","type":"User","site_admin":false},"created_at":"2015-02-19T16:37:26Z","updated_at":"2015-02-19T16:37:26Z","body":"What is your version of docker? `docker --version`"}}