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.
- Is this true? Is Rancher Desktop that good of a drop-in replacement?
- 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?
It’s not pre-installed, but it’s checking one checkbox. Less work than deciding which VM provider to go with.
They should be, and yet I’ve rarely seen them work out like that. Usually I have to debug some issues and follow x StackOverflow responses which don’t work properly. Haven’t had any such issues with WSL2 yet.
… no. Windows Terminal integrates with WSL2 and allows you to open a terminal in Linux without having to set up anything inside of a good Terminal app in Windows. It’s what you’re asking for, but without any setup.
Yes, but inside of a separate canvas. WSL2 GUI apps run as normal windows.
Okay, but I’ve tried running them in a VM and in WSL2. It is integrated the best if you run it under Windows and use the native WSL2 integration. Everything else degrades the experience.
Yes, and then you have to set everything up. With WSL2 in PyCharm I select “Use WSL2 Python”, it lists all the WSL2 Pythons, and I select the WSL2 Python I want. Is it really so difficult to understand that there is a difference between being able to do something and something just being available without setup?
Or I install WSL2 and skip all that.
Yeah, you should read up on how WSL2 works. This is not an issue in any different way from VMs. WSL2 is a VM. It’s everything you’re asking for, but standardized, pre-installed and perfectly integrated. I don’t know why you’d recommend spending all those hours when it’s absolutely not necessary.
It’s like telling a beginner “Yeah, do Linux From Scratch, Ubuntu is way too convenient”.