package
package copied to clipboard
F_Provide volume mounts for my code.
As a cloud-developer, I would like mount a volume into my container, So I can use it with my uservice.
Ex. I would like to have a /data or /tmp directory on my container so my code can use to store some data.
Sounds great, this would be an extension to the RuntimeConfig, please feel free to prototype and send PRs...
I'll take a stab at this. I'm going to make some assumptions:
- This only applies to the Docker executor for now
- The requirements.txt must be in the image
So before I make a PR, I think the runtime options would look something like:
@Containerize(
package={...}
runtime={
volumes={
"/path/on/host": "/path/in/container",
"/another/host/path": "/some/container/path:ro", # <--- notice the ro annotation
}
}
)
def main():
...
Let me know what you think.