-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
OCI Source ignores WORKDIR/WorkingDir #3033
Comments
On an unrelated note: Shouldn't the input and output formats for OCI be the same? I mean, it's a simple tar extraction so it's no biggie, but the asymmetry kind of bugs me. |
Heya 👋 Have opened a PR to fix this, looks like a small oversight in the R.e. your second point, this sounds similar to #1219. There's also some discussion in the OCI source PR here that might be relevant. It looks to me like this is something we definitely want to support to make the OCI source feature as easy-as-possible to use. |
Dang, that was quick :-D |
Indeed it was, and thank you for catching and fixing it.
We did have that discussion; I think we all would like some consistency, but probably without breaking anything backwards compatible. |
Buildx version: da1f4b84969c56dd6960d1f270a365730ad8ef00 (v0.9.0-rc2)
Buildkit version: 7b2c27c
When sourcing from an OCI layout, the WORKDIR of that container is ignored.
In essence, exporting this as an oci tar:
and then extracting it and referencing the dir with
--build-context="workdir-reproduce=oci-layout://...@sha256..."
when building this:will fail, because the workdir is
/
instead of/somedir
.Looking at the commit history I believe @deitch would know what's up here?
Here is a minimal reproduce that can be copied and run directly (only prerequisite is a new enough buildx):
Output:
The text was updated successfully, but these errors were encountered: