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
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.
Source
Thrown at jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/BuildDockerTask.java:151
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
- Make every volume path absolute Unix-style, e.g. '/data/logs'
- Remove any Windows drive-letter paths
- Verify each entry starts with '/'
Example fix
// before
jib { container { volumes = ['data/logs'] } }
// after
jib { container { volumes = ['/data/logs'] } } Defensive patterns
Strategy: validation
Validate before calling
jib.container.volumes.each { v ->
if (!v.startsWith('/')) throw new GradleException("volume must be absolute Unix path: $v")
} Try / catch
try { jibBuild.run() } catch (GradleException e) { if (e.message.contains('container.volumes')) { logger.error(e.message) }; throw e } Prevention
- Volumes are container-internal mount points — always absolute and '/'-prefixed
- Do not reuse host bind-mount paths as volumes
- Lint volume entries in CI
When it happens
Trigger: Adding a volume like volumes = ['/data', 'logs'] where 'logs' is relative, or Windows-style paths like 'C:\data'.
Common situations: Porting Dockerfile VOLUME directives with relative paths, specifying bind-mount-style host paths instead of container paths, or typos dropping the leading slash.
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.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
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/aa7e27ff1b669b6b.
Report an issue: GitHub.