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

Execution takes too long for "Unpacking rootfs as cmd COPY" #3142

Open
zhouya2010 opened this issue Apr 27, 2024 · 1 comment
Open

Execution takes too long for "Unpacking rootfs as cmd COPY" #3142

zhouya2010 opened this issue Apr 27, 2024 · 1 comment
Labels
area/performance issues related to kaniko performance enhancement differs-from-docker priority/p2 High impact feature/bug. Will get a lot of users happy

Comments

@zhouya2010
Copy link

Actual behavior
Creating a custom kaniko image on k8s using the following Dockerfile when execute "Unpacking rootfs as cmd COPY" takes too long:

Dockerfile:

FROM python:3.8
WORKDIR /app
COPY ./main.py ./main.py
COPY ./requirements.txt ./requirements.txt

RUN pip install --no-cache-dir -r requirements.txt 

CMD python main.py

It took nearly 10 minutes at "Unpacking rootfs as cmd COPY ./main.py ./main.py requires it.":

……
[2024-04-27T16:52:37Z] Building stage 'python:3.8' [idx: '0', base-idx: '-1']
[2024-04-27T16:52:37Z] Unpacking rootfs as cmd COPY ./main.py ./main.py requires it.
[2024-04-27T17:02:07Z] WORKDIR /app
[2024-04-27T17:02:07Z] Cmd: workdir
[2024-04-27T17:02:07Z] Changed working directory to /app
……

Expected behavior
should be executed quickly

Additional Information

  • Build Context
      --dockerfile=/kaniko/buildcontext/Dockerfile
      --context=<git_url>
      --destination=<dockerhub>
      --log-timestamp=true
      --skip-tls-verify
    
  • Kaniko Image (bitnami/kaniko:1.22.0)

Triage Notes for the Maintainers

Description Yes/No
Please check if this a new feature you are proposing no
Please check if the build works in docker but not in kaniko yes
Please check if this error is seen when you use --cache flag no
Please check if your dockerfile is a multistage dockerfile no
@JeromeJu JeromeJu added area/performance issues related to kaniko performance enhancement priority/p2 High impact feature/bug. Will get a lot of users happy differs-from-docker labels May 1, 2024
@JeromeJu
Copy link
Collaborator

JeromeJu commented May 1, 2024

Thanks for filing this @zhouya2010. Would you mind elaborating the time took with docker since it is checked off Please check if the build works in docker but not in kaniko

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/performance issues related to kaniko performance enhancement differs-from-docker priority/p2 High impact feature/bug. Will get a lot of users happy
Projects
None yet
Development

No branches or pull requests

2 participants