Re:Painless desktop containers for everyday development
by smoochy on Sunday June 05, 2022 @07:48AM
(#31630107)
I wasn't paying much attention to all sorts of safety issues, like potential RCEs, because this was initially intended for local development, not production use. But do let me know if you see how someone would be able to exploit those scripts without `dock` user knowing about it.
Also, thank you for trying it out and reporting it works even on Windows, pleasantly surprised.
Re:Painless desktop containers for everyday development
by CoolCold on Sunday June 05, 2022 @07:59AM
(#31630184)
I did some monkey patching for exposing ports and it works even further - okay, it automagically logins via ssh now as expected. I can probably send it as is to Github/Gitlab so you have an idea.
Disclaimer: was not considering any edge cases with my changes.
Re:Painless desktop containers for everyday development
by smoochy on Sunday June 05, 2022 @08:05AM
(#31630229)
Could you please email me the git patch? Or put it on Github/Gitlab yourself and send me the link.
(I think I do make it a bit complex for people to contribute, but I don't have a lot of time to spare).
Re:Painless desktop containers for everyday development
by CoolCold on Sunday June 05, 2022 @08:31AM
(#31630394)
Pushed to Github, please take a look - https://github.com/CoolCold/dock/commit/101950b2275b3e920c55...
P.S. Email sounds like it's 1997 and lynx/elinks are still actual ;)
Re:Painless desktop containers for everyday development
by smoochy on Sunday June 05, 2022 @09:28AM
(#31630801)
Yeah, ok. I'll be setting up a Github repo soon. I guess that's how we roll these days. Github will be learning more about how to program Bash then.
Re:Painless desktop containers for everyday development
by CoolCold on Sunday June 05, 2022 @08:42AM
(#31630474)
> But do let me know if you see how someone would be able to exploit those scripts
My (and my teams) rule of thumb is simple here - if shellcheck complains, that better be reviewed, usually it complains for a reason and makes code better/safer.
I've tried to run `dock` under WSL2 and install works fine, container creation works fine, but connecting through SSH fails - due the fact that Docker is really running in different VM and is not directly accessible (ssh just times out). Looks like, adding some small modifications of way of exposing ssh/connecting there should allow it as well.
On side note - bash scripting is very nicely done! But running through `shellcheck` gives some hints on safer handling, i.e.