So we have a package we install (gcloud/gsutil) that pulls in a bunch of cruft (like their docs files) which includes a requirements.txt with a dependency having a high CVE score. Was asked if we could "delete" that file, and came here to confirm my understanding
- "deletes" are not real, the files still exist in prior layers
- The dagger way to do this is to install the packages in another container and then copy the files into our runtime image
directory.Diff()will be helpful in finding the files added in a layer, which we can then use for a copy with include/exclude