-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extraDirectories property should validate if the supplied path exists #3542
Comments
Thank you for submitting this enhancement request. |
The reason we don't check the existence is due to the default implicit directory |
Hi @chanseokoh I've raised a PR. Could you approve the build? so that we can see which tests are failing. Thanks! |
@tommysitu I just approved it. |
Thanks for reviewing the PR @chanseokoh. Shall I close this issue? |
From Jib Gitter:
One workaround in Gradle I can think of is to create it explicitly: extraDirectories {
mkdir "${buildDir}/jib-extras"
paths = ["${buildDir}/jib-extras"]
} |
i got error on gradle
my command: |
@cebrailinanc just create the directory before running Gradle, like |
I tried but it didn't work. Because we need to open a folder within the image. |
Oh, I see what you were thinking. It must be that you thought the syntax of the command-line parameter would be
, but the command-line supports only the basic form of
. If you want to specify the |
i think, it's not useful, |
Sure, go ahead open a new issue. |
Anyways, if you are familiar with Gradle, you can always define your own property as a workaround to templatize |
I used it by defining it in the
|
Environment:
Description of the issue:
Using the
extraDirectories
config above to copy additional files doesn't fail the build even the path is invalid or not a folder. This behaviour is not good for catching bugs early if the additional files are crucial for the docker container.Expected behaviour:
Should be similar to the
docker build
command which would throw the following exception if aDockerfile
has a command to copy a non-existent folder:The text was updated successfully, but these errors were encountered: