GoogleContainerTools/jib · error · GradleException
container.volumes is not an absolute Unix-style path: ${inva
Error message
container.volumes is not an absolute Unix-style path: ${invalidVolume} What it means
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.
Source
Thrown at jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildImageTask.java:146
} catch (InvalidContainerizingModeException ex) {
throw new GradleException(
"invalid value for containerizingMode: " + ex.getInvalidContainerizingMode(), ex);
} catch (InvalidWorkingDirectoryException ex) {
throw new GradleException(
"container.workingDirectory is not an absolute Unix-style path: "
+ ex.getInvalidPathValue(),
ex);
} catch (InvalidPlatformException ex) {
throw new GradleException(
"from.platforms contains a platform configuration that is missing required values or has invalid values: "
+ ex.getMessage()
+ ": "
+ ex.getInvalidPlatform(),
ex);
} catch (InvalidContainerVolumeException ex) {
throw new GradleException(
"container.volumes is not an absolute Unix-style path: " + ex.getInvalidVolume(), ex);
} catch (InvalidFilesModificationTimeException ex) {
throw new GradleException(
"container.filesModificationTime should be an ISO 8601 date-time (see "
+ "DateTimeFormatter.ISO_DATE_TIME) or special keyword \"EPOCH_PLUS_SECOND\": "
+ ex.getInvalidFilesModificationTime(),
ex);
} catch (InvalidCreationTimeException ex) {
throw new GradleException(
"container.creationTime should be an ISO 8601 date-time (see "
+ "DateTimeFormatter.ISO_DATE_TIME) or a special keyword (\"EPOCH\", "
+ "\"USE_CURRENT_TIMESTAMP\"): "
+ ex.getInvalidCreationTime(),
ex);
} catch (JibPluginExtensionException ex) {View on GitHub (pinned to fb949e2676)
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.
Example fix
// before
jib {
container { volumes = ['data'] }
}
// after
jib {
container { volumes = ['/data'] }
} Defensive patterns
Strategy: validation
Validate before calling
jib.container.volumes.each { v ->
if (!(v ==~ '^/.*')) {
throw new GradleException("Volume must be an absolute Unix path, got: $v")
}
} Try / catch
try {
tasks.named('jib').get().execute()
} catch (GradleException e) {
if (e.message?.startsWith('container.volumes is not')) {
logger.error("Fix volume paths (must start with '/'): ${e.message}")
}
throw e
} Prevention
- Prefix every volume with '/'.
- Sanitize any user-supplied volume paths before injecting into the Jib config.
- Mirror Dockerfile VOLUME syntax with absolute paths only.
When it happens
Trigger: Adding a volume like 'data' or 'C:\\data' to jib.container.volumes and running a jib build task.
Common situations: 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.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- container.appRoot is not an absolute Unix-style path: ${inva
- container.workingDirectory is not an absolute Unix-style pat
- container.volumes is not an absolute Unix-style path: ${inva
- container.appRoot is not an absolute Unix-style path: ${inva
- container.workingDirectory is not an absolute Unix-style pat
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/dd8f2970d0b93fca.
Report an issue: GitHub.