GoogleContainerTools/jib · error · MojoExecutionException
<container><appRoot> is not an absolute Unix-style path: <in
Error message
<container><appRoot> is not an absolute Unix-style path: <invalidPathValue>
What it means
This is the <container><workingDirectory> analogue of the appRoot check: InvalidWorkingDirectoryException carries the invalid value and BuildDockerMojo rethrows it as MojoExecutionException. The working directory must be an absolute Unix-style path so it is valid inside the Linux container.
Source
Thrown at jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/BuildDockerMojo.java:115
new MavenRawConfiguration(this),
new MavenSettingsServerCredentials(
getSession().getSettings(), getSettingsDecrypter()),
projectProperties,
globalConfig,
new MavenHelpfulSuggestions(HELPFUL_SUGGESTIONS_PREFIX))
.runBuild();
} catch (InvalidAppRootException ex) {
throw new MojoExecutionException(
"<container><appRoot> is not an absolute Unix-style path: " + ex.getInvalidPathValue(),
ex);
} catch (InvalidContainerizingModeException ex) {
throw new MojoExecutionException(
"invalid value for <containerizingMode>: " + ex.getInvalidContainerizingMode(), ex);
} catch (InvalidWorkingDirectoryException ex) {
throw new MojoExecutionException(
"<container><workingDirectory> is not an absolute Unix-style path: "
+ ex.getInvalidPathValue(),
ex);
} catch (InvalidPlatformException ex) {
throw new MojoExecutionException(
"<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 MojoExecutionException(
"<container><volumes> is not an absolute Unix-style path: " + ex.getInvalidVolume(), ex);
} catch (InvalidFilesModificationTimeException ex) {
throw new MojoExecutionException(
"<container><filesModificationTime> should be an ISO 8601 date-time (see "
+ "DateTimeFormatter.ISO_DATE_TIME) or special keyword \"EPOCH_PLUS_SECOND\": "View on GitHub (pinned to fb949e2676)
Solutions
- Set <workingDirectory> to an absolute Unix path starting with '/', e.g. /app/workdir.
- Remove the element if a custom working directory is not required.
- Ensure any property feeding it resolves to a non-empty absolute path.
- Use forward slashes even on Windows hosts.
Example fix
<!-- before --> <container><workingDirectory>workdir</workingDirectory></container> <!-- after --> <container><workingDirectory>/workdir</workingDirectory></container>
Defensive patterns
Strategy: validation
Validate before calling
<workingDirectory>${jib.workdir}</workingDirectory>
<!-- CI pre-check: value must match ^/.+ --> Prevention
- Start workingDirectory with '/' and use forward slashes.
- Do not confuse host paths with in-container paths.
- Guard templated properties against empty values.
- Omit the element if the default is acceptable.
When it happens
Trigger: Setting <container><workingDirectory> to a relative path, a Windows path, or a value without a leading slash, then running jib:dockerBuild.
Common situations: Windows developers entering 'C:\workdir' or 'workdir'; templated values resolving empty; confusion between host paths and in-container paths.
Understand the failure class
Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.
Related errors
- <container><appRoot> is not an absolute Unix-style path: ${e
- <container><workingDirectory> is not an absolute Unix-style
- <container><volumes> is not an absolute Unix-style path: <in
- <container><appRoot> is not an absolute Unix-style path: <in
- <container><workingDirectory> is not an absolute Unix-style
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/8c8d493c0b4ef58b.
Report an issue: GitHub.