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?

  • damnthefilibuster@lemmy.worldOP
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    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?

    • boo one@lemmy.one
      link
      fedilink
      English
      arrow-up
      7
      arrow-down
      3
      ·
      1 year ago

      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.

        • boo one@lemmy.one
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          1
          ·
          1 year ago

          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.

          • dan@upvote.au
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 year ago

            Why would you need a desktop environment though? You’re already running Windows. You can run individual Linux GUI apps, which is enough for pretty much all use cases.

      • FooBarrington@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        1 year ago

        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.

        • boo one@lemmy.one
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          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.

          • FooBarrington@lemmy.world
            link
            fedilink
            English
            arrow-up
            3
            ·
            1 year ago

            WSL2 is already installed and running without any extra setup required, so all the setup time for the VM is additional time you have to spend. You’ll have to fiddle a lot longer than 45min the first time you set it up if you want parity with the WSL2 installation (bidirectional mounts, bidirectional network access, GUI applications as normal windows, integration into Terminal etc). Until everything is running you’ll probably spend half a day, since you’ll have to first look up how to best do these things for your VM environment. Even more so if you want to use Windows tools with WSL2 integration, like the whole IntelliJ suite.

            What features and quirks are you referring to?

            • boo one@lemmy.one
              link
              fedilink
              English
              arrow-up
              1
              ·
              1 year ago

              Is it pre installed nowadays? I rember having to go to some store and doing stuff to get it…

              Mounts and networks should be just checkboxes, dropdowns iirc.

              Terminals are probably better on linux anyway, if we really want the stone age windows tools we can always ssh into it from windows.

              I didnt really get the gui part, linux vm can have, and run GUIs, all the intellij stuff are available for linux natively. Even then iirc they can run with any linux remotely as well, just needs ssh. If you need it to run on windows like native apps, maybe use Xserver via ssh.

              As far as quirks I read some comments in this thread about filesystem being too slow, maybe there are more.

              And now that i have typed all these, if you want it to look and feel exactly as windows withput any compromise, idk…

              • dan@upvote.au
                link
                fedilink
                English
                arrow-up
                2
                ·
                edit-2
                1 year ago

                Terminals are probably better on linux anyway, if we really want the stone age windows tools

                Wut? The Windows tools are a lot newer than the Linux ones. Windows Terminal is better than anything preinstalled on a Linux desktop IMO

                • El Barto@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  1 year ago

                  What are some features that the new windows terminals have that linux terminals don’t?

                  • dan@upvote.au
                    link
                    fedilink
                    English
                    arrow-up
                    3
                    ·
                    edit-2
                    1 year ago

                    It supports tabs out-of-the-box (not all the Linux ones do).
                    It supports profiles so you can have easy access to different commands/shells along with keyboard shortcuts to create a new tab using a specified profile:

                    Profiles aren’t just for the entire window - You can use a different profile per-tab (I think GNOME Terminal forces you to use the same profile for the entire window).
                    You can customize colours and fonts per profile. Has a nice font by default (Cascadia Mono).
                    It’s hardware-accelerated, so fast-scrolling text doesn’t lag.
                    Full UTF-8 and UTF-16 support.
                    Full accessibility (screen readers, etc) support.
                    Search.

                    Linux terminals may support all these features now… Which one do you use?