Folks, I have a node.js script running on my Windows machine that uses the dockerode npm package to talk to docker on said box and starts and kills docker containers.

However, after the containers have been killed off, docker still holds on to the memory that it blocked for those containers and this means downstream processes fail due to lack of RAM.

To counter this, I have powershell scripts to start docker desktop and to kill docker desktop.

All of this is a horrid experience.

On my Mac, I just use Colima with Portainer and couldn’t be happier.

I’ve explored some options to replace Docker Desktop and it seems Rancher Desktop is a drop-in replacement for Docker Desktop, including the docker remote API.

  1. Is this true? Is Rancher Desktop that good of a drop-in replacement?
  2. Does Rancher Desktop better manage RAM for containers that have been killed off? Or does it do the same thing as Docker Desktop and hold on to the RAM?

Are there other options which I’m not thinking of which might solve my problems? I’ve seen a few alternatives but haven’t tried them yet - moby,
containerd,
podman

I don’t actually need the Docker Desktop interface. So pure CLI docker would also just work. How are you all running pure docker on Windows boxes?

You are viewing a single thread.
View all comments View context
2 points

thanks for that :)

BTW, if I fire up a bunch of docker containers in WSL2 using podman or native docker, and then kill them, does WSL2 release the RAM it acquired to run those containers?

permalink
report
parent
reply
4 points

At this point i would just install a linux distro like ubuntu/debian/arch as a VM on virtualbox/vmware/hyperv and do it from there, WSL2 is supposed to be custom ubuntu minus gui running on hypervany way.

permalink
report
parent
reply
3 points

WSL2 runs ubuntu on Hyper-V. It isn’t really as custom as you’d think. You can install other distros besides ubuntu. Or you can install regular ubuntu instead of LTS.

Take a look at this for running other distros: https://learn.microsoft.com/en-us/windows/wsl/use-custom-distro

permalink
report
parent
reply
1 point

TIL, thanks.

permalink
report
parent
reply
2 points

It’s using Hyper-V technology, but it’s not just a VM, and can run on OSes that don’t run Hyper-V, like home editions. https://learn.microsoft.com/en-us/windows/wsl/faq

permalink
report
parent
reply
3 points

minus gui

WSL2 supports GUI apps.

permalink
report
parent
reply
0 points

Meant to say a guo DE, not sure you can run plasma/jde on that, maybe with vnc/rdp? But still its with x11 server iirc.

permalink
report
parent
reply
3 points

And as such it’s perfectly suited for what OP is trying to achieve. A custom VM will be a lot more work than using WSL2.

permalink
report
parent
reply
2 points

I wouldnt say a lot, maybe its more, but i would estimate 15min for wsl2 vs 45min for virtual box. Plus you get lot more featues than plain wsl2 and its quirks.

permalink
report
parent
reply
1 point
*

Time to share this wisdom with IT security departments of the companies I worked for. Wsl2 is in the zero trust white papers of MS (or whatever IT security uses to take decisions). Real distros are not. Result, no trust…

Enterprise IT… Non sense since the 70s

permalink
report
parent
reply

Selfhosted

!selfhosted@lemmy.world

Create post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

Community stats

  • 4.8K

    Monthly active users

  • 3.5K

    Posts

  • 79K

    Comments