GoogleContainerTools/jib · error · GradleException
container.appRoot is not an absolute Unix-style path: ${inva
Error message
container.appRoot is not an absolute Unix-style path: ${invalidPathValue} What it means
Thrown by Jib's Gradle plugin when the container.appRoot configuration value is not an absolute Unix-style path (e.g. must start with '/'). Jib needs a valid absolute target directory on the container filesystem where the app files are placed. It wraps InvalidAppRootException into a GradleException so the build fails with a clear message including the offending value.
Source
Thrown at jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildDockerTask.java:129
getProject(),
getLogger(),
tempDirectoryProvider,
jibExtension.getConfigurationName().get());
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(),View on GitHub (pinned to fb949e2676)
Solutions
- Prefix appRoot with a forward slash so it is absolute Unix-style, e.g. appRoot = "/app"
- Remove any Windows drive letters or backslashes; use forward slashes only
- If targeting a Windows container, note Jib requires Unix-style absolute paths for appRoot
Example fix
// before
jib { container { appRoot = 'myapp' } }
// after
jib { container { appRoot = '/myapp' } } Defensive patterns
Strategy: validation
Validate before calling
def appRoot = jib.container.appRoot
if (appRoot != null && !appRoot.startsWith('/')) {
throw new GradleException("appRoot must be absolute Unix path, got: $appRoot")
} Try / catch
try { jibBuild.run() } catch (GradleException e) { if (e.message.contains('container.appRoot')) { logger.error("Fix appRoot to an absolute path: " + e.message) ; throw e } throw e } Prevention
- Always start appRoot with '/'
- Avoid copying Windows paths into build configs
- Add a CI check asserting jib config paths are absolute
When it happens
Trigger: Setting appRoot in the jib { container { appRoot = ... } } block to a relative path like 'app' or 'my/app', a Windows-style path like 'C:\app', or a path with a drive letter/leading non-slash character.
Common situations: Migrating configs from Windows dev machines, copying appRoot settings from Docker/other tools that use relative paths, or typo-ing the leading slash when configuring a custom deployment directory (e.g. /deploy/myapp).
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- container.workingDirectory is not an absolute Unix-style pat
- container.volumes is not an absolute Unix-style path: ${inva
- container.appRoot is not an absolute Unix-style path: ${inva
- container.workingDirectory is not an absolute Unix-style pat
- 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/e24b1949cf47382c.
Report an issue: GitHub.