Command "docker stats" via ssh


On my Linux system, I try

ssh root@ 'docker stats --no-stream ’

and it works. Then I try

ssh root@ 'docker stats --no-stream --format “{{.Container}}” ’

and I receive the message “unknown flag: --format”

I also try with " but it’s not succesfull.

Does anyone already try this ?

Thank you for your help

does it work on for you?
For me it works. It often happens that some systems convert the -- to something else :slight_smile:

Thx to try to respond.
However I do not succeed to use these commands in "play-with-docker"
When I try
ssh root@ ‘ls’ => it works
ssh root@ ‘docker stats’ => bash:docker: command not found

but docker is of course available on !!! Don’t understand

For my problem “–no-stream” is Ok, so I don’t think that the problem come from "–"
I have tried different thing with caracter " or ’ or the same with \ but no hope…


Problem resolved. The targeted machine had an old docker release and “–format” was not available…