Closed loosebazooka closed 7 years ago
you can use https://github.com/kubernetes/minikube/pull/1792 to obtain the docker config for minikube
Starting with getting the minikube docker env vars, will take these steps:
1) Create a shared utility class called CommandExecutor that can run a shell command and get the output. 2) Have CommandExecutor be able to run commands with certain environment variables. 3) Use this CommandExecutor in a new DockerBuildTask to retrieve the minikube docker env vars.
Then will take these steps:
docker build
command with the retrieved minikube docker env vars.
run a docker build into the minikube env.
command line equivalent
Probably exposed to the user as
minikubeDockerBuild
, unfortunately there's no official docker plugin to link to, so we might have to use the docker java api directly to initiate a build.