Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] cann't use docker volume share in different docker container #934

Open
luojiyin1987 opened this issue Apr 22, 2024 · 3 comments
Labels
kind/question Further information is requested

Comments

@luojiyin1987
Copy link

Question

Before asking a question, make sure you have:

  • Reviewed relevant Kubernetes information: Google your error messages and look at K8s docs.
  • Searched open and closed GitHub issues
  • Read the documentation: JuiceFS CSI Driver Doc

What help did you want:
share juicefs in different docker container
Environment:

  • docker image juicedata/mount:latest hash: ae0cddb9a71f
  • docker version:
docker  info     
Client: Docker Engine - Community
 Version:    25.0.2
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.12.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.24.5
    Path:     /usr/libexec/docker/cli-plugins/docker-compose
  • Object storage (cloud provider and region): Azure 中国 wasb

  • Metadata engine info (version, cloud provider managed or self maintained): pg:latest hash:07e2ee723e2d

  • Network connectivity (JuiceFS to metadata engine, JuiceFS to object storage): docker

docker network inspect  polyfiller_polyfiller 
[
    {
        "Name": "polyfiller_polyfiller",
        "Id": "dbd69523c3b79e178ccd2da34dbfd384bccbe52c0049bd1862665c9203e3b037",
        "Created": "2024-04-22T17:37:28.305360371+08:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.20.36.0/24",
                    "Gateway": "172.20.36.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "64c86b66b14b3df3d9c13b14b03a4e35b4c3caed13d8e750cd3e61dd64b31d55": {
                "Name": "polyfiller-myjfs-1",
                "EndpointID": "e7074499aeec9946c2d39be93260b5cf4ff9c1f0a11bd4badeb4aa837760a7a9",
                "MacAddress": "02:42:ac:14:24:05",
                "IPv4Address": "172.20.36.5/24",
                "IPv6Address": ""
            },
            "85ca1d1d0a930b6a39ddb02d151de0872062b54e2aad9242306d7278f2b8e090": {
                "Name": "polyfiller-meta-server-1",
                "EndpointID": "e7a91236ad440035894716c40feca29d1d485661c2770eff1bd4240d02bbbac3",
                "MacAddress": "02:42:ac:14:24:02",
                "IPv4Address": "172.20.36.2/24",
                "IPv6Address": ""
            },
            "e880c8992ca17dd1846e314077581e763dd2987fcd7072b8d287198a265c478a": {
                "Name": "polyfiller-api-service-1",
                "EndpointID": "004ccd61716290e85ca263a75889e046c8638ab1c60c3f4faa973dd5043f6a5d",
                "MacAddress": "02:42:ac:14:24:03",
                "IPv4Address": "172.20.36.3/24",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {
            "com.docker.compose.network": "polyfiller",
            "com.docker.compose.project": "polyfiller",
            "com.docker.compose.version": "2.24.5"
        }
    }
]

I can see api-service container /tmp/@wessberg/polyfiller file save in docker volume myjfs-data .
when I into myjfs container to see /mnt , I can't find any file.

root@64c86b66b14b:/# juicefs  info   /mnt
/mnt :
inode: 1
files: 0
 length: 0 Bytes
size: 4.00 KiB (4096 Bytes)
 path: /
@luojiyin1987 luojiyin1987 added the kind/question Further information is requested label Apr 22, 2024
@zwwhdls
Copy link
Member

zwwhdls commented Jun 12, 2024

Hi, can you try set dependence myjfs on api-service and have a retry? It's because myjfs container should be ready before application container which uses juicefs.

@luojiyin1987
Copy link
Author

Hi, can you try set dependence myjfs on api-service and have a retry? It's because myjfs container should be ready before application container which uses juicefs

I use Rclone to mount Azure Blob
https://github.com/kaiyuanshe/Polyfiller/blob/faaf1cc16800773ef6dacc24402303a8a1da242b/docker-compose.yml#L13-L28

@luojiyin1987
Copy link
Author

luojiyin1987 commented Jun 12, 2024

@zwwhdls dependence myjfs on api-service , I had tryed it 。 juicsFS can share file with other Docker container by Host Volume , but Named Volume is not work .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants