Class ContainerImageJibConfig
java.lang.Object
io.quarkus.container.image.jib.deployment.ContainerImageJibConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanControls the optimization which skips downloading base image layers that exist in a target registry.The directory to use for caching application layers.The directory to use for caching base image layers.The base image to be used when a container image is being produced for the jar build.The base image to be used when a container image is being produced for the native binary build.The password to use to authenticate with the registry used to pull the base JVM imageThe username to use to authenticate with the registry used to pull the base JVM imagestatic final StringSets environment variables used by the Docker executable.Name of binary used to execute the docker commands.Environment variables to add to the container imageThe path of a file in which the digest of the generated image will be written.The path of a file in which the id of the generated image will be written.Additional JVM arguments to pass to the JVM when starting the applicationThe JVM arguments to pass to the JVM when starting the applicationIf this is set, then it will be used as the entry point of the container image.Additional arguments to pass when starting the native applicationIf this is set, then it will be used as the entry point of the container image.booleanWhether or not to operate offline.List of target platforms.The ports to exposebooleanWhether to set the creation time to the actual build time.booleanWhether to set the modification time (last modified time) of the files put by Jib in the image to the actual build time.The user to use in generated imageThe working directory to use in the generated image. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
DEFAULT_WORKING_DIR
- See Also:
-
baseJvmImage
The base image to be used when a container image is being produced for the jar build. When the application is built against Java 21 or higher,registry.access.redhat.com/ubi8/openjdk-21-runtime:1.18is used as the default. Otherwiseregistry.access.redhat.com/ubi8/openjdk-17-runtime:1.18is used as the default. -
baseNativeImage
The base image to be used when a container image is being produced for the native binary build. The default is "quay.io/quarkus/quarkus-micro-image". You can also use "registry.access.redhat.com/ubi8/ubi-minimal" which is a bigger base image, but provide more built-in utilities such as the microdnf package manager. -
jvmArguments
@ConfigItem(defaultValue="-Djava.util.logging.manager=org.jboss.logmanager.LogManager") public List<String> jvmArgumentsThe JVM arguments to pass to the JVM when starting the application -
jvmAdditionalArguments
Additional JVM arguments to pass to the JVM when starting the application -
nativeArguments
Additional arguments to pass when starting the native application -
jvmEntrypoint
If this is set, then it will be used as the entry point of the container image. There are a few things to be aware of when creating an entry point- Entrypoint "INHERIT" means to inherit entrypoint from base image,
jvmArgumentsfield is used for arguments - A valid entrypoint is jar package specific (see
quarkus.package.type) - A valid entrypoint depends on the location of both the launching scripts and the application jar file. To that
end it's helpful to remember that when
fast-jarpackaging is used (the default), all necessary application jars are added to the/workdirectory and that the same directory is also used as the working directory. Whenlegacy-jaroruber-jarare used, the application jars are unpacked under the/appdirectory and that directory is used as the working directory. - Even if the
jvmArgumentsfield is set, it is ignored completely unless entrypoint is "INHERIT"
- Entrypoint "INHERIT" means to inherit entrypoint from base image,
-
nativeEntrypoint
If this is set, then it will be used as the entry point of the container image. There are a few things to be aware of when creating an entry point- Entrypoint "INHERIT" means to inherit entrypoint from base image,
nativeArgumentsfield is used for arguments - A valid entrypoint depends on the location of both the launching scripts and the native binary file. To that end
it's helpful to remember that the native application is added to the
/workdirectory and that and the same directory is also used as the working directory - Even if the
nativeArgumentsfield is set, it is ignored completely unless entrypoint is "INHERIT"
- Entrypoint "INHERIT" means to inherit entrypoint from base image,
-
environmentVariables
Environment variables to add to the container image -
baseRegistryUsername
The username to use to authenticate with the registry used to pull the base JVM image -
baseRegistryPassword
The password to use to authenticate with the registry used to pull the base JVM image -
ports
The ports to expose -
user
The user to use in generated image -
workingDirectory
The working directory to use in the generated image. The default value is chosen to work in accordance with the default base image. -
alwaysCacheBaseImage
@ConfigItem(defaultValue="false") public boolean alwaysCacheBaseImageControls the optimization which skips downloading base image layers that exist in a target registry. If the user does not set this property, then read as false. Iftrue, base image layers are always pulled and cached. Iffalse, base image layers will not be pulled/cached if they already exist on the target registry. -
platforms
List of target platforms. Each platform is defined using the pattern:<os>|<arch>[/variant]|<os>/<arch>[/variant]
for example:linux/amd64,linux/arm64/v8
If not specified, OS default is linux and architecture default isamd64. If more than one platform is configured, it is important to note that the base image has to be a Docker manifest or an OCI image index containing a version of each chosen platform. The feature does not work with native images, as cross-compilation is not supported. This configuration is based on an incubating feature of Jib. See Jib FAQ for more information. -
imageDigestFile
The path of a file in which the digest of the generated image will be written. If the path is relative, the base path is the output directory of the build tool. -
imageIdFile
The path of a file in which the id of the generated image will be written. If the path is relative, the base path is the output directory of the build tool. -
offlineMode
@ConfigItem(defaultValue="false") public boolean offlineModeWhether or not to operate offline. -
dockerExecutableName
Name of binary used to execute the docker commands. This is only used by Jib when the container image is being built locally. -
dockerEnvironment
Sets environment variables used by the Docker executable. This is only used by Jib when the container image is being built locally. -
useCurrentTimestamp
@ConfigItem(defaultValue="true") public boolean useCurrentTimestampWhether to set the creation time to the actual build time. Otherwise, the creation time will be set to the Unix epoch (00:00:00, January 1st, 1970 in UTC). See Jib FAQ for more information -
useCurrentTimestampFileModification
@ConfigItem(defaultValue="true") public boolean useCurrentTimestampFileModificationWhether to set the modification time (last modified time) of the files put by Jib in the image to the actual build time. Otherwise, the modification time will be set to the Unix epoch (00:00:00, January 1st, 1970 in UTC). If the modification time is constant (flag is set to false so Unix epoch is used) across two consecutive builds, the docker layer sha256 digest will be different only if the actual files added by Jib to the docker layer were changed. More exactly, having 2 consecutive builds will generate different docker layers only if the actual content of the files within the docker layer was changed. If the current timestamp is used the sha256 digest of the docker layer will always be different even if the content of the files didn't change. -
baseImageLayersCache
The directory to use for caching base image layers. If not specified, the Jib default directory is used. -
applicationLayersCache
The directory to use for caching application layers. If not specified, the Jib default directory is used.
-
-
Constructor Details
-
ContainerImageJibConfig
public ContainerImageJibConfig()
-