#HostDirectory.write(DirectoryID) vs Directory.write(HostDirectoryID)
1 messages · Page 1 of 1 (latest)
🧵
one thing this surfaced is it's awkward to pass a HostDirectoryID for the workdir, because it's actually just a const "__dagger_workdir", not currently exposed
@coarse jetty do we have a stable API for writing any directory to the host?
HostDirectory.write exists, yeah, I don't know if it's "stable" though 😆
Seems like if we have that, we should be able to compose it Container { rootfs } ?
oh no, nevermind
it has to either be the workdir or a pre-configured host dir
it's the OCI tarball forget I said anything
right right, I need a proper OCI image with config and all that jazz
OK I have what I need to compose an appropriately bikesheddy response
excellent
and done
We used a trick with FSID where "scratch" was a special scalar value that indicated scratch. I have a memory of us doing the same thing with host workdir, but I could be making it up
But also relevent to that, as part of the dagger.json stuff that __dagger_workdir is no longer a const, it gets changed in each buildkit session (to fix some other issues)
I like the idea of leveraging Directory, I think it might be hard to put the export back into an LLB representation though 🤔 ... unless we overload Directory and make that happen late?
oh awesome, i was thinking about doing that