{"record":{"id":"aa7e27ff1b669b6b","repo":"GoogleContainerTools/jib","slug":"container-volumes-is-not-an-absolute-unix-style-pa","errorCode":null,"errorMessage":"container.volumes is not an absolute Unix-style path: ${invalidVolume}","messagePattern":"container\\.volumes 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":151,"sourceCode":"      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(),\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 \"\n              + \"DateTimeFormatter.ISO_DATE_TIME) or special keyword \\\"EPOCH_PLUS_SECOND\\\": \"\n              + ex.getInvalidFilesModificationTime(),\n          ex);\n\n    } catch (InvalidCreationTimeException ex) {\n      throw new GradleException(\n          \"container.creationTime should be an ISO 8601 date-time (see \"\n              + \"DateTimeFormatter.ISO_DATE_TIME) or a special keyword (\\\"EPOCH\\\", \"\n              + \"\\\"USE_CURRENT_TIMESTAMP\\\"): \"\n              + ex.getInvalidCreationTime(),\n          ex);\n\n    } catch (JibPluginExtensionException ex) {","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildDockerTask.java#L133-L169","documentation":"Thrown when an entry in container.volumes is not an absolute Unix-style path. Jib exposes volumes as mount points in the container and validates each starts with '/'. The offending value is included in the GradleException.","triggerScenarios":"Adding a volume like volumes = ['/data', 'logs'] where 'logs' is relative, or Windows-style paths like 'C:\\data'.","commonSituations":"Porting Dockerfile VOLUME directives with relative paths, specifying bind-mount-style host paths instead of container paths, or typos dropping the leading slash.","solutions":["Make every volume path absolute Unix-style, e.g. '/data/logs'","Remove any Windows drive-letter paths","Verify each entry starts with '/'"],"exampleFix":"// before\njib { container { volumes = ['data/logs'] } }\n// after\njib { container { volumes = ['/data/logs'] } }","handlingStrategy":"validation","validationCode":"jib.container.volumes.each { v ->\n  if (!v.startsWith('/')) throw new GradleException(\"volume must be absolute Unix path: $v\")\n}","typeGuard":null,"tryCatchPattern":"try { jibBuild.run() } catch (GradleException e) { if (e.message.contains('container.volumes')) { logger.error(e.message) }; throw e }","preventionTips":["Volumes are container-internal mount points — always absolute and '/'-prefixed","Do not reuse host bind-mount paths as volumes","Lint volume entries in CI"],"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"}