microsoft / vscode-docker-extensibility

Docker for Visual Studio Code: Extensibility Model

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`State` field is absent in `container ls` on some versions of Docker

bwateratmsft opened this issue · comments

Discovered in microsoft/vscode-docker#3724. Likely the user has an older version of Docker, I see from the screenshot that the docker context ls command also lacks the --format argument, which is not something we can work around. Still, if we can gracefully handle the missing State field that would be ideal.

I think we would need to find a canary field that suggests that State is absent. I'm not a big fan of that approach; it sounds very fragile / too heuristic.