{"record":{"id":"dd8f2970d0b93fca","repo":"GoogleContainerTools/jib","slug":"container-volumes-is-not-an-absolute-unix-style-pa-dd8f29","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/BuildImageTask.java","lineNumber":146,"sourceCode":"    } 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 \"\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":128,"sourceCodeEnd":164,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildImageTask.java#L128-L164","documentation":"Each path in container.volumes must be an absolute Unix-style path because it becomes a VOLUME declaration in the image. Jib throws InvalidContainerVolumeException for relative or non-Unix values, which the Gradle task surfaces as this GradleException including the offending volume path.","triggerScenarios":"Adding a volume like 'data' or 'C:\\\\data' to jib.container.volumes and running a jib build task.","commonSituations":"Forgetting the leading slash when listing mount points; Windows-style separators; converting a Dockerfile with relative VOLUME entries; programmatic config built from user input without normalization.","solutions":["Prefix each volume with a forward slash, e.g. volumes = ['/data', '/logs'].","Remove any Windows drive/backslash paths and use Unix paths.","Drop invalid/unnecessary volume entries."],"exampleFix":"// before\njib {\n  container { volumes = ['data'] }\n}\n// after\njib {\n  container { volumes = ['/data'] }\n}","handlingStrategy":"validation","validationCode":"jib.container.volumes.each { v ->\n  if (!(v ==~ '^/.*')) {\n    throw new GradleException(\"Volume must be an absolute Unix path, got: $v\")\n  }\n}","typeGuard":null,"tryCatchPattern":"try {\n  tasks.named('jib').get().execute()\n} catch (GradleException e) {\n  if (e.message?.startsWith('container.volumes is not')) {\n    logger.error(\"Fix volume paths (must start with '/'): ${e.message}\")\n  }\n  throw e\n}","preventionTips":["Prefix every volume with '/'.","Sanitize any user-supplied volume paths before injecting into the Jib config.","Mirror Dockerfile VOLUME syntax with absolute paths only."],"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"}