#How do you share a volume between containers?

1 messages · Page 1 of 1 (latest)

lofty crow
#

Hi everyone!

I'm trying to write a Dagger function to run my e2e tests. Nothing too special, just a few containers, using .AsService() and .WithServiceBinding("svc", svc).

The particularity in my setup is that I need to provision a shared volume where these different services will read and write contents. This is something that I've achieved in other environments successfully, e.g.: k8s + shared volume within a pod, k8s + persistentvolume (ReadWriteMany) or in Docker Compose by sharing a volume with multiple services.

Is there an equivalent in the Dagger space? AFAIK mounted directories and cache volumes while very useful they're not quite the same thing.

Thank you in advance!

shrewd bear
lofty crow
#

Really? I must have done something wrong then, I had one service add contents to the volume but it read as empty from another container. I'll try again, thank you! Will report back.

shrewd bear
lofty crow
#

Thank you!