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

Thread files from image's ancestors all the way through to it's output #65

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

bcmyers
Copy link
Contributor

@bcmyers bcmyers commented Aug 29, 2024

As you construct images by layering them on top of one another, e.g.

oci_image(
   name = "image1",
   base = "@ubuntu//image",
   layers = [":layer1"],
)

oci_image(
  name = "image2",
  base = ":image1",
  layers = [":layer2"],
)

You want the images to keep passing the files of their ancestors along the chain.

This is not expensive (because we are using depset) and it will enable future improvements, in particular writing an oci_image_tar rule that knows how to turn an oci_image target into a tar file that conforms to the OCI Image Layout spec and can be loaded into local Docker. This PR sets the groundwork for that kind of functionality since, with this change, image2's output in the above example will now contain all the files from @base//image, layer1 and layer2, which are all required to create a tarball. Before this change, image2's output only contains the files from layer2

@bcmyers bcmyers changed the title Thread files from image's ancestors all the way through it's output Thread files from image's ancestors all the way through to it's output Aug 29, 2024
Copy link
Contributor

@joneshf-dd joneshf-dd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for Language Tools!

👏 praise: Thanks for fixing this! Very excited about what this unlocks!

@bcmyers bcmyers merged commit 14fd546 into DataDog:main Aug 30, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants