-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Hi!
I've been using this extension for some time now, great work!
I'm thinking about monitoring remote docker containers. It could be easilly done if you could tweak the docker command or just add a prefix so you can run the command through ssh.
In example, taking the getContainers
function, instead of having:
const psOut = await execCommand(["docker", "ps", "-a", "--format", "{{.Names}},{{.Status}}"]);
have something like this:
const psOut = await execCommand([`${COMMAND_PREFIX} docker`, "ps", "-a", "--format", "{{.Names}},{{.Status}}"]);
where COMMAND_PREFIX
comes from preferences. If nothing is set, everything keeps working local but if you set it to something like ssh myuser@my-remote-host
the extension will be running the command on a different machine through ssh. I'm asuming ssh keys configured, but if security is not an issue you can use something like sshpass -pMyNotSoGreatPassword ssh myuser@my-remote-host
. It would be really useful.
Also, once including preferences, the 2 seconds refreshing time can be too much in some cases, would be great to make it configurable.
What do you think about these changes?
Cheers!