Skip to content
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

Cannot stat: No such file or directory #362

Closed
jozefkoscak opened this issue Sep 22, 2018 · 1 comment · Fixed by #456
Closed

Cannot stat: No such file or directory #362

jozefkoscak opened this issue Sep 22, 2018 · 1 comment · Fixed by #456
Assignees
Labels
kind/bug Something isn't working

Comments

@jozefkoscak
Copy link

I tried to build Dockerfile (similar to this one) with Gitlab CI,

FROM composer:1.7.1 AS composer
FROM php:7.3.0RC1-cli-alpine3.8
COPY --from=composer /usr/bin/composer /usr/bin/composer

COPY ./ /app
WORKDIR /app

RUN ls -l

Actual result in current version
gcr.io/kaniko-project/executor:debug-8fb220b19b227bde9b7f4653da3b6b282be2fea4
and
gcr.io/kaniko-project/executor:debug-deda0ea04decceb8b758c764e6eeb9b8000e4095

INFO[0094] cmd: /bin/sh                                 
INFO[0094] args: [-c ls -l]                             
sh: ls -l: Cannot stat: No such file or directory
sh: Exiting with failure status due to previous errors

Expected result as in version
gcr.io/kaniko-project/executor:debug-bb75c0461887034f40f5ba836cfd17647d2cf544

INFO[0086] args: [-c ls -l]                             
total 12
-rw-rw-rw-    1 root     root           273 Sep 22 17:02 Dockerfile
@priyawadhwa priyawadhwa added the kind/bug Something isn't working label Sep 24, 2018
@priyawadhwa
Copy link
Collaborator

Could be related to #359, comment here

dlorenc pushed a commit that referenced this issue Sep 26, 2018
* Enable overwriting of links (solves #351)

* add integration test to check extraction of images with replaced hardlinks

* Prevent following symlinks during extracting normal files

This fixes #359, #361, #362.
@priyawadhwa priyawadhwa self-assigned this Nov 16, 2018
priyawadhwa pushed a commit to priyawadhwa/kaniko that referenced this issue Nov 17, 2018
When we execute multistage builds, we store the fs of each intermediate
stage at /kaniko/<stage number> if it's used later in the build. This
created a bug when extracting hardlinks, because we weren't appending
the new directory to the link path.

So, if `/tmp/file1` and `/tmp/file2` were hardlinked, kaniko was trying
to link `/kaniko/0/tmp/file1` to `/tmp/file2` instead of
`/kaniko/0/tmp/file2`. This change will append the correct directory to
the link, and fixes GoogleContainerTools#437 GoogleContainerTools#362 GoogleContainerTools#352 GoogleContainerTools#342.
priyawadhwa pushed a commit to priyawadhwa/kaniko that referenced this issue Nov 17, 2018
When we execute multistage builds, we store the fs of each intermediate
stage at /kaniko/<stage number> if it's used later in the build. This
created a bug when extracting hardlinks, because we weren't appending
the new directory to the link path.

So, if `/tmp/file1` and `/tmp/file2` were hardlinked, kaniko was trying
to link `/kaniko/0/tmp/file1` to `/tmp/file2` instead of
`/kaniko/0/tmp/file2`. This change will append the correct directory to
the link, and fixes GoogleContainerTools#437 GoogleContainerTools#362 GoogleContainerTools#352 GoogleContainerTools#342.
priyawadhwa pushed a commit to priyawadhwa/kaniko that referenced this issue Nov 17, 2018
When we execute multistage builds, we store the fs of each intermediate
stage at /kaniko/<stage number> if it's used later in the build. This
created a bug when extracting hardlinks, because we weren't appending
the new directory to the link path.

So, if `/tmp/file1` and `/tmp/file2` were hardlinked, kaniko was trying
to link `/kaniko/0/tmp/file1` to `/tmp/file2` instead of
`/kaniko/0/tmp/file2`. This change will append the correct directory to
the link, and fixes GoogleContainerTools#437 GoogleContainerTools#362 GoogleContainerTools#352 GoogleContainerTools#342.
sleepycat added a commit to cds-snc/report-a-cybercrime that referenced this issue Jun 21, 2019
Kaniko builds a bit faster and simplifies cloudbuild config a little by
automatically pushing images. Unfortunately it seems to build images that have
missing files, which then causes breakage downstream.
As an example:
GoogleContainerTools/kaniko#362
sleepycat added a commit to cds-snc/report-a-cybercrime that referenced this issue Jun 21, 2019
Kaniko builds a bit faster and simplifies cloudbuild config a little by
automatically pushing images. Unfortunately it seems to build images that have
missing files, which then causes breakage downstream.
As an example:
GoogleContainerTools/kaniko#362
sleepycat added a commit to cds-snc/report-a-cybercrime that referenced this issue Jun 21, 2019
Kaniko builds a bit faster and simplifies cloudbuild config a little by
automatically pushing images. Unfortunately it seems to build images that have
missing files, which then causes breakage downstream.
As an example:
GoogleContainerTools/kaniko#362
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants