Docker alternative on Windows10

Photo by Ian Taylor on Unsplash

Docker alternative on Windows10

Ever since Docker Desktop changed their policy, I've been searching for a way to work with containers without hassle on my Windows machine. I tried Podman and docker on WSL2, even a docker binary for windows. They all have their pain points, especially with having WSL2 running. I love WSL2, but the access speed issue for NTFS files was an issue for me. I mean, I could have done all my checkouts only on WSL2, used VSCode to always connect to WSL2... but old habits die hard.

This is going to be a small post now to show how I finally worked it out. I will keep adding any configurations that I keep doing to make my Dev Experience better:

Use MINIKUBE!

All I ever wanted with docker was docker build and docker run. And of course clean and purge and all. minikube exposes a way to do this now!

  1. Install minikube on Windows10. Head over to their awesome docs to see how.

  2. Get minkube working as non admin

  3. Run minikube with hyperv as driver and enable the addons

    minikube start --driver=hyperv
    minikube addons enable dashboard
    minikube addons enable ingress
    
  4. If/when minikube misbehaves (I had some problems with hibernate), if restarting doesn't work, nuke and restart! For this make sure to have the script ready to install everything that is needed.

minikube delete

Docker Replacement:

To build container images:

minikube image build -t my_image .

minikube.sigs.k8s.io/docs/handbook/pushing/..

To run the container, run it as a pod in minikube!

kubectl run my_container --image=my_image **--image-pull-policy=Never** .......

That imagePullPolicy is important!.


I'm still having problems with VPN access from the k8s pods in minikube, I might have to tinker with the hosts file to fix this.. Still waiting for a clean approach.