docker / docker/buildx

oci-layout:// build contexts should work with .tar files

Open
#1,553 0 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/enhancement
Dominant language
Go
Stars
4.5k
Forks
682
Avg merge
2d 14h
Merged PRs (30d)
29

Description

Currently, a user is required to either pass the new unpack=true option to the OCI exporter, or to unpack the tar manually on build. If an OCI layout tar is already provided, then it needs to be manually unpacked.

Ideally, buildx should handle this case, unpacking the tar, and present the oci-layout tar as a store to containerd. If possible, it would be good to handle such functionality without needing to completely unpack the tar. Though, local.NewStore takes a filepath, we could potentially investigate a version that could take an fs.FS interface? Then connect the tar -> fs.FS -> containerd content store.

cc @AkihiroSuda, do you know of an interface in containerd that might make this easier to implement neatly?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the oci-layout:// build-context handling and inspect how local.NewStore currently receives a filepath. Investigate whether a tar-to-fs.FS path can connect to the containerd content store without fully unpacking the archive. Done means an OCI layout tar works directly as a build context without requiring manual unpacking or unpack=true.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
build-system, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.