Comments (12)
Just created a PR, please take a look @stepchowfun. Thanks!
from toast.
Hi @NOBLES5E, thanks for filing this feature request. I agree that it seems like a useful feature.
However, I personally have never needed this, since generally I use input_paths
to copy the files from a project into the container with the same directory structure. So I'd be curious to learn more about your use case—perhaps you are using Toast in a different way than I do (which would be interesting to learn about!).
Also, I just wanted to confirm: do you know about the location
field which allows you to change the base path for all files copied into the container? I rarely use this as well (since the default location is usually as good as any), but it can be useful if some program expects the files to be in a particular location for some reason (e.g., nginx likes to serve files from /usr/share/nginx/html/
by default).
I can't promise any particular timeline or guarantee about this feature being implemented. For now I will leave the issue open for discussion.
from toast.
Thanks! In my case I need to mount a different host directory to target/
directory in the container to do incremental build. Are there any better solutions?
from toast.
Oh my mistake—I seem to have misread and thought it was about input_paths
rather than mount_paths
.
Just checking: Did you know mount_paths
can be relative? On the host they are relative to the directory containing the toastfile, and in the container they are relative to the location
of the task. Does that address your use case, or do they need to be totally distinct paths?
from toast.
Yes, but I have multiple build tasks, and they use different directories like this:
task host container
task1 target-task1/ target/
task2 target-taks2/ target/
task3 target-task3/ target/
Currently I can create a symlink in the container manually like
task host container
task1 target-task1/ target/ -> target-task1/
task2 target-taks2/ target/ -> target-taks2/
task3 target-task3/ target/ -> target-taks3/
But it feels awkward 😢
from toast.
I see—thanks for explaining. If I may ask, why do the 3 target-taskN
directories need to be distinct on the host? Or why do they need to map to the same directory in the container? I'd be curious learning about what build system/language/toolchain you're using that calls for this arrangement.
from toast.
Yes they need to be distinct. They are used to compile the program under different system environments (different rustc, and system libraries like libc). If we use only one directory, compiler will raise error when doing incremental compilation.
from toast.
@stepchowfun Do you think we should add this feature? I can help create a pull request implementing this if needed.
from toast.
The only thing I'm unsure about is: which of the following fields would support this feature?
input_paths
mount_paths
mount_readonly
output_paths
output_paths_on_failure
Functionality wise, I think it would make sense for all of them to support this feature for consistency. But I expect it will be much easier to implement this for the mount_
fields than the others, and then the output_
fields would be the next easiest to implement, and input_paths
would probably be the most difficult.
I am grateful for your willingness to contribute (thank you!). To avoid any potential confusion down the road, maybe we can align on the plan first? Which of those would you plan to implement?
from toast.
I was thinking about mount_
fields since that is what I need now and seems easy to do. Not sure about how to implement other fields yet.
from toast.
Ok, that sounds reasonable to me.
from toast.
from toast.
Related Issues (20)
- Hidden Tasks HOT 10
- Print Task Schedule HOT 1
- toast 0.45.0 cannot print tasks HOT 2
- Support for Container Linking & Services HOT 4
- Add man page HOT 3
- Get error `Password: su: Authentication failure` when su cannot authenticate HOT 4
- Add Keywords To Project HOT 1
- Automatically disable cache when needed HOT 1
- Adding a PowerShell installation script HOT 5
- --shell causes "Unable to canonicalize the source directory. Reason: No such file or directory (os error 2)" HOT 2
- Remote execution via DOCKER_HOST incurs 50x ping latency. HOT 7
- When using remote DOCKER_HOST, cannot mount paths HOT 1
- License isn't recognized as MIT HOT 1
- Parallel task execution HOT 2
- Shared container/host download cache HOT 3
- 'toast'-bin collides with 'gsm' HOT 1
- PATH is overridden when using su HOT 3
- Adding an optional `net` or `network` corresponding to the `--network` flag in docker cli HOT 1
- Mount_paths on Windows not working properly HOT 4
- mount_paths can delete a directory in the container HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from toast.