{"record":{"id":"ff2067233d3e81ee","repo":"GoogleContainerTools/jib","slug":"container-workingdirectory-is-not-an-absolute-unix-ff2067","errorCode":null,"errorMessage":"container.workingDirectory is not an absolute Unix-style path: ${ex.getInvalidPathValue()}","messagePattern":"container\\.workingDirectory is not an absolute Unix-style path: (.+?)","errorType":"exception","errorClass":"GradleException","httpStatus":null,"severity":"error","filePath":"jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildTarTask.java","lineNumber":155,"sourceCode":"    try {\n      PluginConfigurationProcessor.createJibBuildRunnerForTarImage(\n              new GradleRawConfiguration(jibExtension),\n              ignored -> 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    } 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(),\n          ex);\n\n    } catch (InvalidContainerVolumeException ex) {\n      throw new GradleException(\n          \"container.volumes is not an absolute Unix-style path: \" + ex.getInvalidVolume(), ex);\n\n    } catch (InvalidFilesModificationTimeException ex) {\n      throw new GradleException(\n          \"container.filesModificationTime should be an ISO 8601 date-time (see \"","sourceCodeStart":137,"sourceCodeEnd":173,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildTarTask.java#L137-L173","documentation":"Jib validates that container.workingDirectory is an absolute Unix-style path (leading '/', forward slashes) when building the tarball; InvalidWorkingDirectoryException is thrown otherwise and wrapped in this GradleException with the offending value.","triggerScenarios":"Running gradle jibBuildTar with jib { container { workingDirectory = 'work' } } (relative) or a Windows-style path, or a value without a leading slash.","commonSituations":"Setting a relative working directory for the container process; Windows-developer path habits ('C:\\\\work'); editing config and dropping the leading '/'; copying Docker WORKDIR-style relative values.","solutions":["Make the value absolute Unix-style, e.g. jib { container { workingDirectory = '/work' } }","Use forward slashes only; remove drive letters/backslashes","Remove the workingDirectory setting if the default is acceptable"],"exampleFix":"// before\njib { container { workingDirectory = 'home/app/work' } }\n// after\njib { container { workingDirectory = '/home/app/work' } }","handlingStrategy":"validation","validationCode":"def wd = project.jib.container.workingDirectory.getOrElse('')\nif (wd && !(wd ==~ /^\\/[^\\0]+/)) throw new GradleException(\"container.workingDirectory must be absolute Unix path: $wd\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Start workingDirectory with '/'","Use forward slashes only","Omit the setting when a default is fine"],"tags":["jib","gradle","validation","working-directory"],"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-14T05:17:10.506Z"}