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

Snapshot only specific files for COPY #319

Merged
merged 2 commits into from
Aug 27, 2018

Commits on Aug 27, 2018

  1. Snapshot only specific files for COPY

    Before GoogleContainerTools#289 was merged, when copying over directories for COPY kaniko
    would get a list of all files at the destination specified and add them
    to the list of files to be snapshotted. If the destination was root it
    would add all files. This worked because the snapshotter made sure the
    file had been changed before adding it to the layer.
    
    After GoogleContainerTools#289, we changed the logic to add all files snapshotted to a layer
    without checking if the files had been changed. This created the bug in
    got all the files at root and added them to the layer without checking
    if they had been changed.
    
    This change should fix this bug. Now, the CopyDir function returns a
    list of files it copied over and only those files are added to the list
    of files to be snapshotted.
    
    Should fix GoogleContainerTools#314
    Priya Wadhwa committed Aug 27, 2018
    Configuration menu
    Copy the full SHA
    9a93f5b View commit details
    Browse the repository at this point in the history
  2. Add specific files from tar archives to list of snapshotted filesa

    I changed UnpackLocalTarArchive to return a list of files that were
    extracted, so that the list of snapshotted files for ADD is more
    accurate. Previously, we used to add all files in the extracted dir to
    be snapshotted, but this could result in preexisting files being
    snapshotted again.
    Priya Wadhwa committed Aug 27, 2018
    Configuration menu
    Copy the full SHA
    7080a8d View commit details
    Browse the repository at this point in the history