Docker image definitions for Koski Labs projects managed as Maven sub-modules, built and published to Docker Hub using Fabric 8's Maven Docker plugin.
This image is intended for use to execute builds through Koski Lab's Builder under Alpine. It includes libc and other prerequisites for Builder and JDK Wrapper to function under Alpine.
- No Scripting - Leverage standardized tasks in the Fabric8 Maven Docker Plugin for building, running and pushing Docker images.
- Release Process - The Maven Release Plugin provides a well-defined process for versioning, tagging and committing releases to the project.
- Testing - The Maven build lifecycle already supports unit testing of any code you compile and include in your Docker image using the Surefire Plugin as well as integration testing of the resulting Docker image using the Failsafe Plugin.
- Version Locking - When combined with artifact publication into a Maven repository like Maven Central, Nexus or Artifactory the version of a released docker image cannot be changed by the release process since the version is locked in the Maven repository. Of course the Docker tags remain mutable but at least they won't be changed by the release process!
Only requires Docker daemon to be installed and running.
To build all docker images:
docker-images> ./jdk-wrapper.sh ./mvnw verify
However, you can also build only a specific sub-module (docker image) by invoking:
docker-images> echo "Module:"; read MODULE; ./jdk-wrapper.sh ./mvnw -pl ${MODULE} verify
All builds must be executed from the root of the project.
Sub-modules in this project are versioned and released independently. Releases are performed using the Maven release plugin which updates the sub-module version and SCM tag in the sub-module's pom.xml based on your input. The plugin performs two updates as separate commits; first, to commit the next release version, and second to commit the next developer version. Travis will builds each of these commits publishing artifacts (in this case Docker images) to the configured release repositories (in this case Docker Hub).
Before releasing a new version of a subm-module, determine the appropriate version change (X, Y or Z) based on the change history since the most recent release (don't forget to rebase!). Please see semver.org for more information on how to version artifacts. Next, simply invoke the Maven Release plugin which will ask for the sub-module name, release version and the next development version.
docker-images> echo "Module:"; read MODULE; ./jdk-wrapper.sh ./mvnw -pl ${MODULE} release:prepare && ./jdk-wrapper.sh ./mvnw -pl ${MODULE} release:clean && git pull
Published under Apache Software License 2.0, see LICENSE
© Ville Koskela, 2018