{"record":{"id":"e24b1949cf47382c","repo":"GoogleContainerTools/jib","slug":"container-approot-is-not-an-absolute-unix-style-pa","errorCode":null,"errorMessage":"container.appRoot is not an absolute Unix-style path: ${invalidPathValue}","messagePattern":"container\\.appRoot is not an absolute Unix-style path: (.+?)","errorType":"validation","errorClass":"GradleException","httpStatus":null,"severity":"error","filePath":"jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildDockerTask.java","lineNumber":129,"sourceCode":"            getProject(),\n            getLogger(),\n            tempDirectoryProvider,\n            jibExtension.getConfigurationName().get());\n    GlobalConfig globalConfig = GlobalConfig.readConfig();\n    Future<Optional<String>> updateCheckFuture =\n        TaskCommon.newUpdateChecker(projectProperties, globalConfig, getLogger());\n    try {\n\n      PluginConfigurationProcessor.createJibBuildRunnerForDockerDaemonImage(\n              new GradleRawConfiguration(jibExtension),\n              ignored -> java.util.Optional.empty(),\n              projectProperties,\n              globalConfig,\n              new GradleHelpfulSuggestions(HELPFUL_SUGGESTIONS_PREFIX))\n          .runBuild();\n\n    } catch (InvalidAppRootException ex) {\n      throw new GradleException(\n          \"container.appRoot is not an absolute Unix-style path: \" + ex.getInvalidPathValue(), ex);\n\n    } catch (InvalidContainerizingModeException ex) {\n      throw new GradleException(\n          \"invalid value for containerizingMode: \" + ex.getInvalidContainerizingMode(), ex);\n\n    } catch (InvalidWorkingDirectoryException ex) {\n      throw new GradleException(\n          \"container.workingDirectory is not an absolute Unix-style path: \"\n              + ex.getInvalidPathValue(),\n          ex);\n\n    } catch (InvalidPlatformException ex) {\n      throw new GradleException(\n          \"from.platforms contains a platform configuration that is missing required values or has invalid values: \"\n              + ex.getMessage()\n              + \": \"\n              + ex.getInvalidPlatform(),","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildDockerTask.java#L111-L147","documentation":"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.","triggerScenarios":"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.","commonSituations":"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).","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"],"exampleFix":"// before\njib { container { appRoot = 'myapp' } }\n// after\njib { container { appRoot = '/myapp' } }","handlingStrategy":"validation","validationCode":"def appRoot = jib.container.appRoot\nif (appRoot != null && !appRoot.startsWith('/')) {\n  throw new GradleException(\"appRoot must be absolute Unix path, got: $appRoot\")\n}","typeGuard":null,"tryCatchPattern":"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 }","preventionTips":["Always start appRoot with '/'","Avoid copying Windows paths into build configs","Add a CI check asserting jib config paths are absolute"],"tags":["gradle","jib","configuration","path-validation"],"backgroundTag":"invalid-config-value","analyzedSha":"fb949e2676afbbd7dd7a1ef61e20251931325654","analyzedAt":"2026-09-06T14:04:09.491Z","contentChangedAt":"2026-09-06T14:04:09.491Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}