Following on from #12545 we'd like to add buildpack support so that Docker images can be created easily from Maven/Gradle via a buildpack.
The following task need addressing:
- [x] Port the
pack
CLI'sbuild
command to Java (#19828) -
- [x] Support lifecycle v6 (#19829)
- [x] Create a new
ImagePackager
tools class (#19834) - [x] Add Maven plugin support (#19830)
- [x] Add Gradle plugin support (#19831)
- [x] Create our own docker location for builder images and create CI for it (#20171)
- [x] Add an integration test for the buildpack code that creates an image and tests it
- [x] Zero the creation dates of the ephemeral builder (#20126)
- [x] Use the spring boot version in
EphemeralBuilder.updateMetadata(..)
(#20126) - [x] Drop
getDefaultDirsLayer
andgetStackLayer
fromEphemeralBuilder
(#19832) - [x] Test on a real Windows box
- [x] Automatically setup $BP_JAVA_VERSION OpenJDK Buildpack env variable for JDK version (#20172)
- [x] Update documentation (#19868)
- [ ] Provide a publish option to push the image to a registry (including #20560)
Comment From: leobut
I really love this feature and how it is coming along so far. Great work! Just one question: Will it be possible to allow custom settings for the Docker image like for example additional ports or environment variables?
Comment From: snicoll
@ControlTheBit that's really something to do in the builder. A buildpack it defines can contribute anything to the docker image. For instance the JMX builder can contribute the relevant JVM properties to JAVA_OPTS
if JMX support is required. This is controller by a flag (BP_JMX
) that you can set as an env
variable in the Maven or Gradle plugin.
You can also come chat with the community on Gitter if you have more questions.
Comment From: philwebb
I'm closing this one now since it's mostly complete. We'll deal with #20560 if we can.