GoogleContainerTools / minikube-build-tools-for-java

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

Have minikubeDockerBuild be more helpful by providing default parameters. #14

Closed coollog closed 7 years ago

coollog commented 7 years ago

Currently, minikubeDockerBuild (#7) takes a context and flags.

We want it to be more helpful by providing some default docker build parameters as part of the task configuration:

~~1. dockerfile- configures the task with -f <value>

Please comment with more ideas about what configuration to provide. The above list will be updated with more ideas.

r2d4 commented 7 years ago

It might be useful to auto-populate the "tag" parameter with something like $ORGANIZATION/$PROJECT_NAME:$VERISON

coollog commented 7 years ago

Okay, how about having a field like:

imageTagConfig - nested with properties: organizationName, projectName, version (Configures the task with -t <organizationName>/<projectName>:<version>)

@loosebazooka

coollog commented 7 years ago

Also, @loosebazooka , it seems that the Dockerfile must be in the build context, so a default context of build/libs with a default Dockerfile of src/main/docker/Dockerfile would not work.

loosebazooka commented 7 years ago

I think you can just have those be base properties on the task, with defaults pulled from the gradle config, like project.version and project.name?

coollog commented 7 years ago

What if the user wanted to not use the auto-populated task? Should we include another property called useAutoGeneratedTag that defaults to true?

loosebazooka commented 7 years ago

I'm not sure what the override order is, but if the user uses -t in "flags", that should override whatever we've configured from imageTagConfig (or whatever that config ends up being)

coollog commented 7 years ago

The user can actually specify multiple -t tags, and it will tag the same image with each tag that is provided, so there is no override.

coollog commented 7 years ago

Closed pending design for new way of building with the Minikube Docker environment.