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

  1. Set <workingDirectory> to an absolute Unix path starting with '/', e.g. /app/workdir.
  2. Remove the element if a custom working directory is not required.
  3. Ensure any property feeding it resolves to a non-empty absolute path.
  4. 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

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


AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06). Data as JSON: /api/errors/8c8d493c0b4ef58b. Report an issue: GitHub.