{"record":{"id":"09b1882dc93616c6","repo":"GoogleContainerTools/jib","slug":"container-volumes-is-not-an-absolute-unix-style-pa-09b188","errorCode":null,"errorMessage":"container.volumes is not an absolute Unix-style path: ${ex.getInvalidVolume()}","messagePattern":"container\\.volumes 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":168,"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":150,"sourceCodeEnd":186,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildTarTask.java#L150-L186","documentation":"Every path in jib.container.volumes must be an absolute Unix-style path; Jib throws InvalidContainerVolumeException when a volume value is relative or otherwise invalid while building via jibBuildTar, wrapped in this GradleException showing the invalid volume.","triggerScenarios":"Running gradle jibBuildTar with jib { container { volumes = ['data/logs'] } } (missing leading slash) or any non-absolute/Windows-style volume path in the set.","commonSituations":"Listing volumes relative to appRoot expecting Jib to resolve them; copy-pasting a Dockerfile VOLUME with a relative path; typos dropping the leading '/'; Windows path habits.","solutions":["Prefix each volume with '/', e.g. jib { container { volumes = ['/var/log/app'] } }","Use forward slashes only and remove drive letters/backslashes","Remove invalid volume entries if they were added by mistake"],"exampleFix":"// before\njib { container { volumes = ['var/log/app', '/data'] } }\n// after\njib { container { volumes = ['/var/log/app', '/data'] } }","handlingStrategy":"validation","validationCode":"project.jib.container.volumes.get().each { v ->\n  if (!(v ==~ /^\\/[^\\0]+/)) throw new GradleException(\"container.volumes entries must be absolute Unix paths: $v\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prefix every volume path with '/'","Never copy relative VOLUME paths from Dockerfiles verbatim","Keep volumes list minimal and reviewed"],"tags":["jib","gradle","validation","volumes"],"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"}