GoogleContainerTools / GoogleContainerTools/jib

extraDirectories directory that doesn't exist locally: in command-line(-Djib.extraDirectories.paths)

Open
#4,184 1 comment 2 reactions 0 assignees View on GitHub
priority: p3 type:bug
Dominant language
Java
Stars
14.5k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

**Environment**:

- *Jib version:* 3.4.0
- *Build tool:* Gradle
- *OS:* macos

**Description of the issue**:
I get an error when I try to build with the command line. Parameter `-Djib.extraDirectories.paths` parse incorrectly.
[This code](https://github.com/GoogleContainerTools/jib/blob/0df8ed9e0e6990321f1193d214915987127962b9/jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/ExtraDirectoriesParameters.java#L74-L79) only receiving as `from`. Value of `into` always is `'/'`

Command:
> ./gradlew jibDockerBuild --image=poc-jib:latest -Djib.from.image=openjdk:21-slim -Djib.extraDirectories.paths='extra, /var/temp'

[discussed here](https://github.com/GoogleContainerTools/jib/issues/3542#issuecomment-1936305607)

**Expected behavior**:
should have copied the files in the `extra` to `/var/temp`

**Steps to reproduce**:

1. I created a sample project (https://github.com/cebrailinanc/jib-demo)
2.

**Log output**:
> * What went wrong:
> Execution failed for task ':jibDockerBuild'.
> extraDirectories.paths contain "from" directory that doesn't exist locally: /var/temp

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.