Open briandealwis opened 2 years ago
@briandealwis I'm running into this issue, but as part of my build process as opposed to unit tests. What are some of those workarounds you mentioned?
@MSPigl you should be able to run something like:
(eval $(minikube docker-env); skaffold build ...)
/cc @OladapoAjala Is this something you are interested in working next? This issue is also in minikube land!
Yes @tejal29, should be fun. Thanks.
@OladapoAjala let us know if you are still planning to work on this.
@tejal29 yes, I'm however engaged a bit right now. Is this high prior?
Actually the workaround is to unset the minikube
variables before running said command:
(eval $(minikube docker-env --unset); <your command here>)
Is there any update on a better fix for this?
@ddobrin was attempting to use Skaffold and Jib with a Spring Boot project. This project includes tests that use testcontainers.org to spin up emulators using docker containers from Java code. The tests fail when run from Skaffold as Skaffold isn't propagating the
minikube docker-env
to the Jib build, and so the tests try spinning up containers with Docker Desktop's daemon rather than minikube's daemon.We should propagate the
minikube docker-env
for all tools being invoked from Skaffold.There are a few workarounds, but none are ideal as the Cloud Run emulation case uses a separate minikube profile and which may not exist until Cloud Code launches the app with the Cloud Run emulator.
minikube docker-env -p ...
eval $(minikube docker-env -p ...); code .
cc: @sujit-kamireddy