GoogleContainerTools / minikube-build-tools-for-java

Minikube lifecycle management tools for Gradle and Maven.
Apache License 2.0
57 stars 27 forks source link

minikubeDockerBuild #7

Closed loosebazooka closed 7 years ago

loosebazooka commented 7 years ago

run a docker build into the minikube env.

command line equivalent

> eval $(minikube docker-env)
> docker build ....

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.

loosebazooka commented 7 years ago

you can use https://github.com/kubernetes/minikube/pull/1792 to obtain the docker config for minikube

coollog commented 7 years ago

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.

coollog commented 7 years ago

Then will take these steps:

  1. Have DockerBuildTask run the docker build command with the retrieved minikube docker env vars.