{"id":13581095,"url":"https://github.com/juicedata/docker-volume-juicefs","last_synced_at":"2025-06-11T09:32:17.800Z","repository":{"id":37340552,"uuid":"131540334","full_name":"juicedata/docker-volume-juicefs","owner":"juicedata","description":"Docker volume plugin for juicefs","archived":false,"fork":false,"pushed_at":"2025-05-09T07:01:50.000Z","size":899,"stargazers_count":37,"open_issues_count":8,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-06T06:59:59.814Z","etag":null,"topics":["docker","juicefs","volume-plugin"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/juicedata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-04-30T00:13:04.000Z","updated_at":"2025-06-01T20:55:09.000Z","dependencies_parsed_at":"2024-04-11T21:10:48.464Z","dependency_job_id":"3a1cfcab-a83d-4179-a2da-6e1163f8ab3e","html_url":"https://github.com/juicedata/docker-volume-juicefs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juicedata%2Fdocker-volume-juicefs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juicedata%2Fdocker-volume-juicefs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juicedata%2Fdocker-volume-juicefs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juicedata%2Fdocker-volume-juicefs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juicedata","download_url":"https://codeload.github.com/juicedata/docker-volume-juicefs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juicedata%2Fdocker-volume-juicefs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259238954,"owners_count":22826828,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","juicefs","volume-plugin"],"created_at":"2024-08-01T15:01:58.052Z","updated_at":"2025-06-11T09:32:17.766Z","avatar_url":"https://github.com/juicedata.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Docker Volume Plugin for Juicefs\n\n[![Build Status](https://travis-ci.com/juicedata/docker-volume-juicefs.svg?token=ACsZ5AkewTgk5D5wzzds\u0026branch=master)](https://travis-ci.com/juicedata/docker-volume-juicefs)\n\nModified from https://github.com/vieux/docker-volume-sshfs\n\n## Usage\n\n``` shell\ndocker plugin install juicedata/juicefs\n\n# JuiceFS Community Edition\ndocker volume create -d juicedata/juicefs:latest -o name=$JFS_VOL -o metaurl=$JFS_META_URL jfsvolume\ndocker run -it -v jfsvolume:/opt busybox ls /opt\n\n# JuiceFS Enterprise Edition\ndocker volume create -d juicedata/juicefs:latest -o name=$JFS_VOL -o token=$JFS_TOKEN -o access-key=$JFS_ACCESSKEY -o secret-key=$JFS_SECRETKEY jfsvolume\ndocker run -it -v jfsvolume:/opt busybox ls /opt\n```\n\n## Development\n\nBoot up vagrant environment\n\n``` shell\nvagrant up\nvagrant ssh\n```\n\nInside vagrant\n\n``` shell\nexport WORKDIR=~/go/src/docker-volume-juicefs\nmkdir -p $WORKDIR\nrsync -avz --exclude plugin --exclude .git --exclude .vagrant /vagrant/ $WORKDIR/\ncd $WORKDIR\nmake\nmake enable\ndocker volume create -d juicedata/juicefs:next -o name=$JFS_VOL -o token=$JFS_TOKEN -o access-key=$JFS_ACCESSKEY -o secret-key=$JFS_SECRETKEY jfsvolume\ndocker run -it -v jfsvolume:/opt busybox ls /opt\n```\n\n### Docker swarm\n\nInstall juicedata/juicefs plugin on **every** worker node, otherwise service mounting JuiceFS volume will not be scheduled.\n\nUse `docker service` to deploy to Docker swarm\n\n``` shell\ndocker service create --name nginx --mount \\\ntype=volume,volume-driver=juicedata/juicefs,source=jfsvolume,destination=/jfs,\\\nvolume-opt=name=$JFS_VOL,volume-opt=token=$JFS_TOKEN,volume-opt=access-key=$JFS_ACCESSKEY,volume-opt=secret-key=$JFS_SECRETKEY nginx:alpine\n```\n\nScale up\n\n``` shell\ndocker service scale nginx=3\n```\n\nDeployment from docker compose file is not supported because there is no way to pass volume options.\n\n## Debug\n\nEnable debug information\n\n``` shell\ndocker plugin disable juicedata/juicefs:latest\ndocker plugin set juicedata/juicefs:latest DEBUG=1\ndocker plugin enable juicedata/juicefs:latest\n```\n\nTo quickly test out HEAD version:\n\n``` shell\ndocker plugin disable juicedata/juicefs:latest\nCC=/usr/bin/musl-gcc go build -o bin/docker-volume-juicefs --ldflags '-linkmode external -extldflags \"-static\"' .\nmv bin/docker-volume-juicefs /var/lib/docker/plugins/3dea603741f58726d65b273d095f2bc01d1a1c8954a5498f5592041df8cdcd6c/rootfs\ndocker plugin enable juicedata/juicefs:latest\n```\n\nThe stdout of the plugin is redirected to dockerd log. The entries have a `plugin=\u003cID\u003e` suffix.\n\n`runc`, the default docker container runtime can be used to collect juicefs log\n\n``` shell\n# runc --root /run/docker/plugins/runtime-root/plugins.moby list\nID                                                                 PID         STATUS      BUNDLE\n452d2c0cf3fd45e73a93a2f2b00d03ed28dd2bc0c58669cca9d4039e8866f99f   3672        running     /run/docker/containerd/...\n\n# runc --root /run/docker/plugins/runtime-root/plugins.moby exec 452d2c0cf3fd45e73a93a2f2b00d03ed28dd2bc0c58669cca9d4039e8866f99f cat /var/log/juicefs.log\numount: can't unmount /jfs/volumes/ci-aliyun: Invalid argument\nUnable to connect to local syslog daemon\n2018/05/07 13:56:19.752864 \u003cINFO\u003e: Cache dir: /var/jfsCache/ci-aliyun limit: 1024 MB\n2018/05/07 13:56:19.756331 \u003cINFO\u003e: Found 0 cached blocks (0 bytes)\n2018/05/07 13:56:20.913240 \u003cINFO\u003e: mount successfully, st_dev: 48\n```\n\nNOTE: the directory for plugin runtime could be `moby-plugins` in some version of Docker.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuicedata%2Fdocker-volume-juicefs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuicedata%2Fdocker-volume-juicefs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuicedata%2Fdocker-volume-juicefs/lists"}