#Hello, thanks for the great work on
1 messages · Page 1 of 1 (latest)
Hey!
Depending on your use case, the best way to do this right now is to call a function that returns a Directory or File and use export
https://docs.dagger.io/reference/979596/cli/#synopsis
If you wanted to do this in real-time (like for example, real time local development with a file watcher) this is sadly not supported but is a high priority for us. There is a ticket for this here: https://github.com/dagger/dagger/issues/6990
Thanks @jade ledge ! Exciting about the possibility to have real-time exports eventually. Regarding export: double checking, from the Python API, would this be something like: dagger.Container.file(...).export(...) (https://dagger-io.readthedocs.io/en/sdk-python-v0.11.0/client.html#dagger.Container.file
Yes but there is a small dragon hidden there because when you call things from the SDK like this (as opposed to calling export from the CLI) export refers to the intermediary container where the engine runs not your laptop 😦
So its likely not going to do what you want if your goal is to see the file locally.
The work covered in this issue shoud make the DX for this a bit cleaner 🙂 https://github.com/dagger/dagger/issues/5993
details of why this is the case are covered here: https://docs.dagger.io/manuals/developer/overview/942201/execution-environment#host-resources
Thanks again for the notes here, I would have been thrown for a loop with that small dragon! Is there a way besides the dagger cli to do something like this? Would it be best to defer to the docker-py project for a reasonable bidirectional volume sync'd alternative?