Zend certified PHP/Magento developer

On Windows, with Docker Desktop installed, how do you reverse “minikube docker-env”?

I’m developing on Windows and have Docker Desktop installed, and I’m currently switching back and forth between that and Minikube for my Docker environment. When I use minikube start, I run this command:

FOR /f "tokens=*" %%i IN ('minikube -p minikube docker-env') DO %%i

That redirects my docker commands to the Docker instance inside the Minikube cluster, as opposed to Docker Desktop. That said, when I run minikube delete, so far I’ve been having to reboot the machine or do something else overkill-ish to point my docker commands back to Docker Desktop.

I want to just create a batch file or something that’ll switch it back without unnecessary hassle.

So what does minikube docker-env do? Essentially it sets these three variables to point to the Docker instance inside the Minikube cluster:

1. DOCKER_TLS_VERIFY
2. DOCKER_HOST
3. DOCKER_CERT_PATH

Perfect! So I’ll just create a batch file that sets those three variables back to what they are when Minikube’s not involved…right? So what are they set to when Docker Desktop’s being used? … … … They aren’t set at all.

In that case then, after deleting a Minikube cluster on Windows, how do you reverse the effects of minikube docker-env and point your docker commands back to Docker Desktop, without restarting the machine or something excessive like that? Restarting Docker Desktop doesn’t work, but even if it did, that still doesn’t really seem like a good, clean way to do this. I’d rather just have a minimalistic batch file.