Skip to content

How can I share the /data/Data directory between two running Foundry containers? #166

Answered by felddy
Nicoolai asked this question in Q&A
Discussion options

You must be logged in to vote

I'm glad the container is working well for you. I have an idea that I think will work.

So, I'm pretty sure Docker will be unhappy trying to resolve a symlink across volumes.

In the second container try mounting the Data directory (from the first) on top of the data mount of second. I just tried this and it seems to work well. (see below).

It's a little confusing with all the things named "data".

Host:

└── parent
    ├── data
    |  └── Data
    └── data1

Container 1:

└── /data (host data)
    └── Data

Container 2:

└── /data (host data1)
    └── Data (host data/Data)
---
version: "3.8"

secrets:
  credentials:
    file: credentials-mine.json

services:
  foundry0:
    image: felddy/foundry…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Nicoolai
Comment options

Answer selected by Nicoolai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants