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

Error processing tar file #952

Closed
stefanfritsch opened this issue Jan 6, 2020 · 2 comments
Closed

Error processing tar file #952

stefanfritsch opened this issue Jan 6, 2020 · 2 comments

Comments

@stefanfritsch
Copy link

Hi,

Actual behavior

Symptom

Kaniko builds broken images that works when built with docker instead.

The error when trying to run the image is:

Error processing tar file(exit status 1): chtimes /etc/service/apache: no such file or directory

Related bugs

Unlike #572 I do push and use --destination, #132 seems to describe the same issue but was closed back in 2018

Build process

The relevant part of the Dockerfile is:

RUN  mkdir /etc/service/apache
COPY apache.sh /etc/service/apache/run
RUN chmod 0500 /etc/service/apache/run

Which leads to the following in the kaniko build:

INFO[0061] RUN  mkdir /etc/service/apache               
INFO[0061] cmd: /bin/sh                                 
INFO[0061] args: [-c mkdir /etc/service/apache]         
INFO[0061] Taking snapshot of full filesystem...        
INFO[0064] COPY apache.sh /etc/service/apache/run       
INFO[0064] Taking snapshot of files...                  
INFO[0064] RUN chmod 0500 /etc/service/apache/run       
INFO[0064] cmd: /bin/sh                                 
INFO[0064] args: [-c chmod 0500 /etc/service/apache/run] 
INFO[0064] Taking snapshot of full filesystem...        
INFO[0065] Adding whiteout for /etc/service/apache     
Job succeeded

Whiteout

On a related note: Could somebody please write a short explanation of kaniko's whiteout behavior? Your own executor-debug image uses a hack:

# Declare /busybox as a volume to get it automatically whitelisted
VOLUME /busybox

So when does kaniko whiteout something and is there no way but VOLUME to stop it?

Expected behavior

The image works like with docker build

To Reproduce

/kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile account/image:latest

Additional Information

For Dockerfile and additional files see this repo.

The image created by kaniko is here (sha256:8b646753fdff45ec5f19395bbf805acac87c79b9a9685facef728011ee6c9dff)

Triage Notes for the Maintainers

Description Yes/No
Please check if this a new feature you are proposing
Please check if the build works in docker but not in kaniko
Please check if this error is seen when you use --cache flag
Please check if your dockerfile is a multistage dockerfile

Thank you,
Stefan

@shortstories
Copy link
Contributor

@stefanfritsch
This issue occurs because /etc/service is a symlink. See #942

root@0dc79d6ef136:/# ls -al /etc | grep service
lrwxrwxrwx 1 root root          22 Nov 16  2017 service -> runit/runsvdir/default

@stefanfritsch
Copy link
Author

Thanks a lot. I'll close this issue then. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants