Accept filters in list containers#262
Conversation
|
The filters query param in Docker API is a pita, it is a json representation of the filters ( |
There was a problem hiding this comment.
This specific test doesn't work in my local test env (docker api 1.18). The is no filtering when passing label filter without 'label' keyword.
|
Seems the label filtering is somehow broken with docker 1.7.0/1.19 also. It finds containers that haven't a label at all. An appropriate log example: |
|
Yes, seems I misunderstood the docs. I have debugged the daemon logs and updated the implementation to work with |
|
@carlossg Thanks for your contribution! |
Based on the list containers with filters options it would seem that filtering containers with label `test=docker-java` could be done with `{"test":["docker-java"]}` which doesn't work
The options that work are `{"label":["test"]}` and `{"label":["test=docker-java"]}`
As seen in docker-java/docker-java#262
Signed-off-by: Carlos Sanchez <[email protected]>
Based on the list containers with filters options it would seem that filtering containers with label `test=docker-java` could be done with `{"test":["docker-java"]}` which doesn't work
The options that work are `{"label":["test"]}` and `{"label":["test=docker-java"]}`
As seen in docker-java/docker-java#262
Signed-off-by: Carlos Sanchez <[email protected]>
PR on top of #260, to test with container labels