-
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
error building image: error building stage: failed to get filesystem from image: mkdir /usr/share/file/magic: not a directory #1469
Comments
* Fixes #1469 : Remove file that matches with the directory path * Fixes #1469 : Remove file that matches with the directory path * Fixes #1469 : Fix lint errors * Fixes #1469 : Fix lint errors * Fixes #1469 : Fix lint errors * Fixes #1469 : Reduce conditional depth * Fixes #1469 : Remove an additional line Co-authored-by: anugu-chegg <anugu.s@chegg.com>
Hi, is this issue fixed? |
@defaultcute12 Yes. This is released as part of https://github.com/GoogleContainerTools/kaniko/releases/tag/v1.5.0 |
we got the same issue on Kaniko version : v1.8.1 + amazoncorretto:17 |
we got the same issue on Kaniko version : v1.9.2 + nvcr.io/nvidia/deepstream:6.2-devel |
get the same issue with Kaniko:v1.9.1 |
Avoid kaniko cache issue Ref: GoogleContainerTools/kaniko#1469
Avoid kaniko cache issue Ref: GoogleContainerTools/kaniko#1469
Has this been fixed? I am getting the same issue with Kaniko:v1.8.0. |
Actual behavior
When kaniko executor is run as a binary from another image, it fails with error
error building image: error building stage: failed to get filesystem from image: mkdir /usr/share/file/magic: not a directory
This issue occurs only when there is a difference in filesystem of container image and the base image of the dockerfile. Ex: /usr/share/file/magic is a directory in the base image whereas it a file in container filesystem.
Why is this happening:
While building a stage, FS is extracted in each layer from tar and gets created on the container except for the mounted directories. While extracting the FS, if there is a dir(/usr/share/file/magic) which needs to be created on the container, and there is already a file(/usr/share/file/magic) with same path on the container then an error(
not a directory
) is thrownExpected behavior
Kaniko executor should not fail while creating a dir if there is already a file with the same path.
There should be a check here, if there exists a file with the dir path then it should be deleted before proceeding with the dir creation
To Reproduce
Steps to reproduce the behavior:
docker build -t container_image .
docker run -v {dockerfile_location}:/workspace container_image /kaniko/executor --dockerfile /workspace/Dockerfile --no-push --verbosity=trace
error building image: error building stage: failed to get filesystem from image: mkdir /usr/share/file/magic: not a directory
Additional Information
Triage Notes for the Maintainers
--cache
flagThe text was updated successfully, but these errors were encountered: