GoogleContainerTools/jib · error · GradleException
invalid value for containerizingMode: ${invalidContainerizin
Error message
invalid value for containerizingMode: ${invalidContainerizingMode} What it means
Thrown when containerizingMode is set to an unsupported value. Jib's Gradle plugin accepts only 'exploded' or 'packaged'. Any other string fails fast at build time with the invalid value included in the message.
Source
Thrown at jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildDockerTask.java:133
GlobalConfig globalConfig = GlobalConfig.readConfig();
Future<Optional<String>> updateCheckFuture =
TaskCommon.newUpdateChecker(projectProperties, globalConfig, getLogger());
try {
PluginConfigurationProcessor.createJibBuildRunnerForDockerDaemonImage(
new GradleRawConfiguration(jibExtension),
ignored -> java.util.Optional.empty(),
projectProperties,
globalConfig,
new GradleHelpfulSuggestions(HELPFUL_SUGGESTIONS_PREFIX))
.runBuild();
} catch (InvalidAppRootException ex) {
throw new GradleException(
"container.appRoot is not an absolute Unix-style path: " + ex.getInvalidPathValue(), ex);
} catch (InvalidContainerizingModeException ex) {
throw new GradleException(
"invalid value for containerizingMode: " + ex.getInvalidContainerizingMode(), ex);
} catch (InvalidWorkingDirectoryException ex) {
throw new GradleException(
"container.workingDirectory is not an absolute Unix-style path: "
+ ex.getInvalidPathValue(),
ex);
} catch (InvalidPlatformException ex) {
throw new GradleException(
"from.platforms contains a platform configuration that is missing required values or has invalid values: "
+ ex.getMessage()
+ ": "
+ ex.getInvalidPlatform(),
ex);
} catch (InvalidContainerVolumeException ex) {
throw new GradleException(View on GitHub (pinned to fb949e2676)
Solutions
- Set containerizingMode to exactly 'exploded' or 'packaged'
- Fix the typo in the jib container config block
- Remove the containerizingMode line to use the default 'exploded'
Example fix
// before
jib { container { containerizingMode = 'exploted' } }
// after
jib { container { containerizingMode = 'exploded' } } Defensive patterns
Strategy: validation
Validate before calling
def mode = jib.container.containerizingMode
if (mode != null && !(mode in ['exploded', 'packaged'])) {
throw new GradleException("containerizingMode must be 'exploded' or 'packaged', got: $mode")
} Try / catch
try { jibBuild.run() } catch (GradleException e) { if (e.message.contains('containerizingMode')) { logger.error(e.message + " — allowed: exploded, packaged") }; throw e } Prevention
- Only use documented values: 'exploded' or 'packaged'
- Copy config from official Jib docs, not blog snippets
- Spell-check enum-like config values
When it happens
Trigger: Setting containerizingMode in the jib { container { ... } } block to a typo like 'exploted', 'war', or any string other than 'exploded' or 'packaged'.
Common situations: Typos when enabling the exploded mode (often to speed up iterative development), copying config snippets from outdated blog posts, or confusing containerizingMode with packaging-related Gradle options.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- invalid value for containerizingMode: ${invalidContainerizin
- container.appRoot is not an absolute Unix-style path: ${inva
- container.workingDirectory is not an absolute Unix-style pat
- from.platforms contains a platform configuration that is mis
- container.volumes is not an absolute Unix-style path: ${inva
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/3a5a7da9b6948891.
Report an issue: GitHub.