Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

dockerode listContainers method not accepting any value for 'all' option #70

Closed
sahilsk opened this issue Jun 20, 2014 · 5 comments
Closed

Comments

@sahilsk
Copy link

sahilsk commented Jun 20, 2014

First of all, many thanks for writing such an awesome wrapper. 馃憤

Here is one case that i come across :

I am trying to get list of all containers bases on user preference whether they want to see all containers or only few that comes by default.
Docker api docs says to specify "all" params in my call. Which works perfectly when i make raw curl call

  xx.x.x.x/containers/json?all=1/true   // Fetches all
  xx.x.x.x/containers/json?all=0/false   // Fetches NOT all
  xx.x.x.x/containers/json?all=garbage   // Fetches all

Now, when i try to make same call with listContainers method it will consider everything given to all as true i.e considering everything garbage even true/false/0/1 values.

  docker.listContainers( {all: null/true/false/1/0}, function(err, containers) {...}  // Fetches All

size option also work like this. ( i haven't tested other options).

Please help me out with this. I am using "dockerode": "~2.0.0"

@apocas
Copy link
Owner

apocas commented Jun 26, 2014

https://github.com/apocas/dockerode/blob/master/examples/listContainers.js

This works perfectly with me.

Which version of Docker are you using?

@sahilsk
Copy link
Author

sahilsk commented Jun 26, 2014

Am using docker 0.8

@apocas
Copy link
Owner

apocas commented Jun 26, 2014

Humm... probably something on that Docker version.

With Docker v1.0.1 it works perfectly :)

@Sigmus
Copy link

Sigmus commented Jun 29, 2014

Works for me too: Docker version 1.0.0, build 63fe64c.

@apocas
Copy link
Owner

apocas commented Jun 29, 2014

Will close this.

@apocas apocas closed this as completed Jun 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants