jponge / vertx-gradle-plugin

An opinionated Gradle plugin for Vert.x projects
Apache License 2.0
113 stars 16 forks source link

Propose an opinionated Docker packaging #18

Open danielpetisme opened 6 years ago

danielpetisme commented 6 years ago

Just as a Jar or a Zip can be seen as a packaging/distribution artefact. We could use the existing docker gradle plugin.

Vertx-gradle-plugin could build programatically a default Dockerfile to run the generated fat jar (like a classic Java app, a Dockerfile option would let the developer define a custom file.

In a first release,I don't think the plugin has to manage the image publication to a repository.

Thoughts?

jponge commented 6 years ago

I'm thinking that:

  1. yes, Docker is one packaging option and we could have it as an option rather than as a default, and
  2. fatjars aren't always the best packaging to build Docker images.

Have you looked at https://github.com/GoogleContainerTools/jib?

jponge commented 6 years ago

Thanks Daniel, I need to check this!