lukaszlach / clip

:whale: Docker Client Plugins Manager - build new plugins, publish them on Docker Hub or just try some plugins from the catalog and install them locally
https://lach.dev/clip
MIT License
130 stars 13 forks source link

sh plugin : Windows Containers #9

Open solvingj opened 5 years ago

solvingj commented 5 years ago

There's another operating system called "Microsoft Windows", which also supports docker and containers, but it has two different native shells referred to as command prompt and powershell, and it also supports bash if it is installed.

A more general plugin could be called "shell" and support any type of container, do you think that's possible?

I guess it's unlikely to be supported here since you actually wrote the plugins in bash, rather than a cross-platform language. Is that accurate?

lukaszlach commented 5 years ago

This is a valid issue, I'd test how to extend the "sh" plugin to support Windows shells as well.

solvingj commented 5 years ago

Wow, that's great news, I really think docker cli plugins are exciting, and you're definitely pioneering bigtime. Thanks to you, I have a few ideas for plugins if I ever find the time.

solvingj commented 5 years ago

Of note, Jenkins CI platform has sh and bat functions, which support linux and windows hosts respectively. The approach of having two separate functions has a major issue with many complaints and feature requests surrounding it. While many things about sh and bat (and posh) syntax are incompatible, many common use cases are compatible. For example, any native binary call, like go xyz or java xyz or python xyz.

It's really frustrating on Jenkins that there's no generic 'command' function which will pass a command through to the default shell for both windows or linux hosts. So, it's not simple to define a job that can run equally well on windows or linux agents, users have to define conditional logic which is ugly. I don't know if that will be relevant in this case, but it might.