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

ADD operation does not support multiple file copies (with tar extractions). Differs from docker builds. #2409

Closed
EricChen1248 opened this issue Feb 24, 2023 · 0 comments · Fixed by #2991
Labels
area/dockerfile-command For all bugs related to dockerfile file commands categorized differs-from-docker feat/docker-syntax kind/bug Something isn't working kind/enhancement New feature or request priority/p1 Basic need feature compatibility with docker build. we should be working on this next. works-with-docker

Comments

@EricChen1248
Copy link

Actual behavior
'ADD' operation does not support multiple files

Expected behavior
'ADD' operation adds (and extracts if tar/gz) all files.

To Reproduce
Steps to reproduce the behavior:

  1. Use kaniko to build the provided Dockerfile

Additional Information

  • Dockerfile
FROM ubuntu:22.04

RUN useradd -m myUser
WORKDIR /app
ADD --chown=myUser:myUser text.txt tar.tar tar.tar.gz /app
  • contains a text.txt, and any random valid tar.tar tar.tar.gz
  • gcr.io/kaniko-project/executor:debug Digest: sha256:ac169723b2076f9d5804f4bc05c98397e286da6fdcdd5a09fdc179f06ccb3be1
  • The resulting image created should have text.txt, as well as any other files that were packaged into tar.tar and tar.tar.gz under the /app directory.
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
@aaron-prindle aaron-prindle added differs-from-docker area/dockerfile-command For all bugs related to dockerfile file commands kind/bug Something isn't working priority/p1 Basic need feature compatibility with docker build. we should be working on this next. works-with-docker kind/enhancement New feature or request labels Jun 12, 2023
aaron-prindle pushed a commit that referenced this issue Feb 29, 2024
* Fix unpack tar.gz archive with ADD instruction, issue #2409

* Added unit test for ADD instruction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dockerfile-command For all bugs related to dockerfile file commands categorized differs-from-docker feat/docker-syntax kind/bug Something isn't working kind/enhancement New feature or request priority/p1 Basic need feature compatibility with docker build. we should be working on this next. works-with-docker
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants