This project is no longer in active development and will be archived in Jan 2022.
You can obtain this POM from Maven Central:
The Expedia Group OSS Parent POM provides a Maven parent POM that is intended to be used by Expedia Group projects that require certain base functionality and need to publish artifacts to Maven Central.
This plugin builds an optimized Docker image for a Java application and uploads it to Docker Hub.
To setup the plugin in a child project add the following plugin references. The git-commit-id-plugin
provides the
last commit time to be used for the creationTime
and filesModificationTime
properties in the jib plugin configuration.
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
</plugin>
There are some default configuration properties that can be changed:
Property | Default | Description |
---|---|---|
docker.from.image |
openjdk | Docker image to build your application from |
docker.from.tag |
8u181-jdk-slim-stretch | Tag for the Docker image from |
docker.container.port |
8080 | Port that the container exposes at runtime |
You can also use mvn package
in order to build your image directly to a Docker daemon.
For more information please refer to the plugin documentation.
If you want to disable the plugin add the argument -Djib.skip=true
when you use mvn
on the command line.
If you experience timeouts, you can set the property jib.httpTimeout
to a value larger than the default of 20s on the command line (e.g. -Djib.httpTimeout=60000
for 60s). At the time of writing, this property is not available as a build configuration parameter, so it has to be added manually. For more information please refer to System Properties.
This project is available under the Apache 2.0 License.
Copyright 2019-2021 Expedia, Inc.