Class JibConfig
- java.lang.Object
-
- io.quarkus.container.image.jib.deployment.JibConfig
-
@ConfigRoot(phase=BUILD_TIME) public class JibConfig extends Object
-
-
Field Summary
Fields Modifier and Type Field Description booleanalwaysCacheBaseImageControls the optimization which skips downloading base image layers that exist in a target registry.Optional<String>baseJvmImageThe base image to be used when a container image is being produced for the jar build.StringbaseNativeImageThe base image to be used when a container image is being produced for the native binary build.Optional<String>baseRegistryPasswordThe password to use to authenticate with the registry used to pull the base JVM imageOptional<String>baseRegistryUsernameThe username to use to authenticate with the registry used to pull the base JVM imagestatic StringDEFAULT_WORKING_DIRMap<String,String>dockerEnvironmentSets environment variables used by the Docker executable.Optional<String>dockerExecutableNameName of binary used to execute the docker commands.Map<String,String>environmentVariablesEnvironment variables to add to the container imageStringimageDigestFileThe path of a file in which the digest of the generated image will be written.StringimageIdFileThe path of a file in which the id of the generated image will be written.Optional<List<String>>jvmAdditionalArgumentsAdditional JVM arguments to pass to the JVM when starting the applicationList<String>jvmArgumentsThe JVM arguments to pass to the JVM when starting the applicationOptional<List<String>>jvmEntrypointIf this is set, then it will be used as the entry point of the container image.Optional<List<String>>nativeArgumentsAdditional arguments to pass when starting the native applicationOptional<List<String>>nativeEntrypointIf this is set, then it will be used as the entry point of the container image.booleanofflineModeWhether or not to operate offline.Optional<Set<String>>platformsList of target platforms.List<Integer>portsThe ports to exposebooleanuseCurrentTimestampWhether to set the creation time to the actual build time.booleanuseCurrentTimestampFileModificationWhether to set the modification time (last modified time) of the files put by Jib in the image to the actual build time.Optional<String>userThe user to use in generated imageStringworkingDirectoryThe working directory to use in the generated image.
-
Constructor Summary
Constructors Constructor Description JibConfig()
-
-
-
Field Detail
-
DEFAULT_WORKING_DIR
public static final String DEFAULT_WORKING_DIR
- See Also:
- Constant Field Values
-
baseJvmImage
@ConfigItem public Optional<String> 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 17 or higher,registry.access.redhat.com/ubi8/openjdk-17-runtime:1.15is used as the default. Otherwiseregistry.access.redhat.com/ubi8/openjdk-11-runtime:1.15is used as the default.
-
baseNativeImage
@ConfigItem(defaultValue="quay.io/quarkus/quarkus-micro-image:2.0") public String 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> jvmArguments
The JVM arguments to pass to the JVM when starting the application
-
jvmAdditionalArguments
@ConfigItem public Optional<List<String>> jvmAdditionalArguments
Additional JVM arguments to pass to the JVM when starting the application
-
nativeArguments
@ConfigItem public Optional<List<String>> nativeArguments
Additional arguments to pass when starting the native application
-
jvmEntrypoint
@ConfigItem public Optional<List<String>> 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
@ConfigItem public Optional<List<String>> 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
@ConfigItem public Map<String,String> environmentVariables
Environment variables to add to the container image
-
baseRegistryUsername
@ConfigItem public Optional<String> baseRegistryUsername
The username to use to authenticate with the registry used to pull the base JVM image
-
baseRegistryPassword
@ConfigItem public Optional<String> baseRegistryPassword
The password to use to authenticate with the registry used to pull the base JVM image
-
ports
@ConfigItem(defaultValue="${quarkus.http.port:8080}") public List<Integer> portsThe ports to expose
-
workingDirectory
@ConfigItem(defaultValue="/home/jboss") public String 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 alwaysCacheBaseImage
Controls 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
@ConfigItem public Optional<Set<String>> 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
@ConfigItem(defaultValue="jib-image.digest") public String 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
@ConfigItem(defaultValue="jib-image.id") public String 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 offlineMode
Whether or not to operate offline.
-
dockerExecutableName
@ConfigItem public Optional<String> 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
@ConfigItem public Map<String,String> 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 useCurrentTimestamp
Whether 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 useCurrentTimestampFileModification
Whether 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.
-
-