All notable changes to this project will be documented in this file.
- New method:
JibContainerBuilder#describeContainer
which returns new class:JibContainerDescription
, containing a selection of information used for the Jib build. (#2115)
- Each local base image layer is pushed immediately after being compressed, rather than waiting for all layers to finish compressing before starting to push. (#1913)
- HTTP redirection URLs are no longer sanitized in order to work around an issue with certain registries that do not conform to HTTP standards. This resolves an issue with using Red Hat OpenShift and Quay registries. (#2106, #1986)
Containerizer.DEFAULT_BASE_CACHE_DIRECTORY
has been changed on MacOS and Windows. (#2216)- MacOS (
$XDG_CACHE_HOME
defined): from$XDG_CACHE_HOME/google-cloud-tools-java/jib/
to$XDG_CACHE_HOME/Google/Jib/
- MacOS (
$XDG_CACHE_HOME
not defined): from$HOME/Library/Application Support/google-cloud-tools-java/jib/
to$HOME/Library/Caches/Google/Jib/
- Windows (
$XDG_CACHE_HOME
defined): from$XDG_CACHE_HOME\google-cloud-tools-java\jib\
to$XDG_CACHE_HOME\Google\Jib\Cache\
- Windows (
$XDG_CACHE_HOME
not defined): from%LOCALAPPDATA%\google-cloud-tools-java\jib\
to%LOCALAPPDATA%\Google\Jib\Cache\
- MacOS (
Containerizer#setAllowInsecureRegistries(boolean)
and thesendCredentialsOverHttp
system property are now effective for authentication service server connections. (#2074)- Fixed inefficient communications when interacting with insecure registries and servers (when
Containerizer#setAllowInsecureRegistries(boolean)
is set). (#946) - Building a tarball with
OCI
format now builds a correctly formatted OCI archive. (#2124) - Now automatically refreshes Docker registry authentication tokens when expired, fixing the issue that long-running builds may fail with "401 unauthorized." (#691)
- Main class inference support for Java 13/14. (#2015)
Containerizer#setAlwaysCacheBaseImage(boolean)
controls the optimization to skip downloading base image layers that exist in a target registry. (#1870)
- Local base image layers are now processed in parallel, speeding up builds using large local base images. (#1913)
- The base image manifest is no longer pulled from the registry if a digest is provided and the manifest is already cached. (#1881)
- Docker daemon base images are now cached more effectively, speeding up builds using
DockerDaemonImage
base images. (#1912) - Now ignores
jib.alwaysCacheBaseImage
system property. UseContainerizer#setAlwaysCacheBaseImage(boolean)
instead. (#1870)
- Fixed temporary directory cleanup during builds using local base images. (#2016)
- Fixed additional tags being ignored when building to a tarball. (#2043)
- Fixed
TarImage
base image failing if tar does not contain explicit directory entries. (#2067)
Jib#from
andJavaContainerBuilder#from
overloads to allow using aDockerDaemonImage
or aTarImage
as the base image. (#1468, #1905)Jib#from(String)
accepts strings prefixed withdocker://
,tar://
, orregistry://
to specify image type.
- To disable parallel execution, the property
jib.serialize
should be used instead ofjibSerialize
. (#1968) TarImage
is constructed usingTarImage.at(...).named(...)
instead ofTarImage.named(...).saveTo(...)
. (#1918)- For retrieving credentials from Docker config (
~/.docker/config.json
),credHelpers
now takes precedence overcredsStore
, followed byauths
. (#1958) - The legacy
credsStore
no longer requires defining empty registry entries inauths
to be used. This now means that ifcredsStore
is defined,auths
will be completely ignored. (#1958)
- Fixed an issue interacting with certain registries due to changes to URL handling in the underlying Apache HttpClient library. (#1924)
- Fixed the regression of slow network operations introduced at 0.10.1. (#1980)
- Fixed an issue where connection timeout sometimes fell back to attempting plain HTTP (non-HTTPS) requests when the
Containerizer
is set to allow insecure registries. (#1949)
JavaContainerBuilder#setLastModifiedTimeProvider
to set file timestamps. (#1818)
JibContainerBuilder#addDependencies
is now split into three methods:addDependencies
,addSnapshotDependencies
,addProjectDependencies
. (#1773)- For building and pushing to a registry, Jib now skips downloading and caching base image layers if the layers already exist in the target registry. This feature will be particularly useful in CI/CD environments. However, if you want to force caching base image layers locally, set the system property
-Djib.alwaysCacheBaseImage=true
. (#1840)
- Manifest lists referenced directly by sha256 are automatically parsed and the first
linux/amd64
manifest is used. (#1811)
Containerizer#addEventHandler
for adding event handlers.
- Multiple classes have been moved to the
com.google.cloud.tools.jib.api
package. - Event handlers are now added directly to the
Containerizer
rather than adding them to anEventHandlers
object first. - Removed multiple classes to simplify the event system (
JibEventType
,BuildStepType
,EventDispatcher
,DefaultEventDispatcher
,LayerCountEvent
) - MainClassFinder now uses a static method instead of requiring instantiation.
- Container configurations in the base image are now propagated when registry uses the old V2 image manifest, schema version 1 (such as Quay). (#1641)
Containerizer#setOfflineMode
to retrieve the base image from Jib's cache rather than a container registry. (#718)
- Labels in the base image are now propagated. (#1643)
- Fixed an issue with using OCI base images. (#1683)
- Overloads for
LayerConfiguration#addEntryRecursive
that take providers to set file permissions and file modification time on a per-file basis. (#1607)
LayerConfiguration
takes file modification time as anInstant
instead of along
.
- Fixed an issue where automatically generated parent directories in a layer did not get their timestamp configured correctly to epoch + 1s. (#1648)
- Fixed an issue where the library creates wrong images by adding base image layers in reverse order when registry uses the old V2 image manifest, schema version 1 (such as Quay). (#1627)
JavaContainerBuilder#setAppRoot()
andJavaContainerBuilder#fromDistrolessJetty()
for building WAR containers. (#1464)Jib#fromScratch()
to start building from an empty base image. (#1471)- Methods in
JavaContainerBuilder
for setting the destination directories for classes, resources, directories, and additional classpath files.
- Allow skipping
JavaContainerBuilder#setMainClass()
to skip setting the entrypoint. os
andarchitecture
are taken from base image. (#1564)
ImageReference
assumesregistry-1.docker.io
as the registry if the host part of an image reference isdocker.io
. (#1549)
ProgressEvent#getBuildStepType
method to get which step in the build process a progress event corresponds to. (#1449)LayerCountEvent
that is dispatched at the beginning of certain pull/build/push build steps to indicate the number of layers being processed. (#1461)
JibContainerBuilder#containerize()
throws multiple sub-types ofRegistryException
rather than wrapping them in anExecutionException
. (#1440)
MainClassFinder
failure when main method is defined using varargs (i.e.public static void main(String... args)
). (#1456)