GoogleContainerTools/jib · error · GradleException
container.volumes is not an absolute Unix-style path: ${ex.g
Error message
container.volumes is not an absolute Unix-style path: ${ex.getInvalidVolume()} What it means
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.
Source
Thrown at jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildTarTask.java:168
} 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 '/', 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
Example fix
// before
jib { container { volumes = ['var/log/app', '/data'] } }
// after
jib { container { volumes = ['/var/log/app', '/data'] } } Defensive patterns
Strategy: validation
Validate before calling
project.jib.container.volumes.get().each { v ->
if (!(v ==~ /^\/[^\0]+/)) throw new GradleException("container.volumes entries must be absolute Unix paths: $v")
} Prevention
- Prefix every volume path with '/'
- Never copy relative VOLUME paths from Dockerfiles verbatim
- Keep volumes list minimal and reviewed
When it happens
Trigger: Running gradle jibBuildTar with jib { container { volumes = ['data/logs'] } } (missing leading slash) or any non-absolute/Windows-style volume path in the set.
Common situations: 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.
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
- Invalid image reference ${invalidReference}, perhaps you sho
- HelpfulSuggestions.forInvalidImageReference(${ex.getInvalidR
- container.appRoot is not an absolute Unix-style path: ${ex.g
- invalid value for containerizingMode: ${ex.getInvalidContain
- container.workingDirectory is not an absolute Unix-style pat
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/09b1882dc93616c6.
Report an issue: GitHub.