denibertovic / docker-hs

A Haskell library for the Docker Engine API
BSD 3-Clause "New" or "Revised" License
76 stars 48 forks source link

Left (DockerClientDecodeError "Error in $[0].Id: ContainerID is not an object.") #64

Closed ababkin closed 6 years ago

ababkin commented 6 years ago

getting this when trying to list containers with listContainers defaultListOpts

it lists images however just fine with same setup but listContainers substituted with listImages

This is on OSX HighSierra 10.13.6 Docker for OSX: Version 18.06.0-ce-mac69 (26398)

this is what curling the endpoint looks like if this helps:

$ curl -v 127.0.0.1:2375/v1.24/containers/json
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 2375 (#0)
> GET /v1.24/containers/json HTTP/1.1
> Host: 127.0.0.1:2375
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Api-Version: 1.38
< Content-Type: application/json
< Docker-Experimental: true
< Ostype: linux
< Server: Docker/18.06.0-ce (linux)
< Date: Wed, 08 Aug 2018 15:21:50 GMT
< Transfer-Encoding: chunked
<
[{"Id":"af124ec80359ea194f4dbf471af8b9fb9fa24eeb6383ef6a051a294c166a048b","Names":["component-name"],"Image":"...","ImageID":"sha256:829299b6ededf742f12557fb5b6a7d8c0f8728c9b7f99df277538a8db2e33806","Command": ...

so the Id is clearly in the json object returned

any other way to debug this?

jprider63 commented 6 years ago

Hi @ababkin. Could you paste the full JSON string? I don't have your version.

ababkin commented 6 years ago

Just realized that I only got this error on the old version of stackage LTS. It works fine in LTS 12.5. Thanks.