Skip to content

Latest commit

 

History

History
65 lines (54 loc) · 2.6 KB

Dockerfile.README.md

File metadata and controls

65 lines (54 loc) · 2.6 KB

Quick reference

JuiceFS Volume Plugin for Docker

This is the JuiceFS docker volume plugin image for both the open source edition and the cloud service, which makes it easy to use JuiceFS as a high performance, massive space persistent storage for Docker containers.

Notice

This is a Docker Volume Plugin image, if you need the standard image with JuiceFS clients packaged, please use the juicedata/mount.

How to use

Denpendency

Since JuiceFS mount depends on FUSE, please make sure that the FUSE driver is already installed on the host, in the case of Debian/Ubuntu.

sudo apt-get -y install fuse

Installation

$ sudo docker plugin install juicedata/juicefs --alias juicefs

Create a volume

sudo docker volume create -d juicefs \  
-o name=<VOLUME_NAME> \  
-o metaurl=<META_URL> \  
-o storage=<STORAGE_TYPE> \  
-o bucket=<BUCKET_NAME> \  
-o access-key=<ACCESS_KEY> \  
-o secret-key=<SECRET_KEY> \  
jfsvolume

Please refer to the following instructions to modify the command:

  • <VOLUME_NAME> - Name of the JuiceFS filesystem
  • <META_URL> - Database address for metadata storage, please refer to How to Set Up Metadata Engine
  • <STORAGE_TYPE> - Storage type, please refer to How to Set Up Object Storage
  • <BUCKET_NAME> - Data storage address, it usually the bucket endpoint address of the object storage.
  • <ACCESS_KEY> and <SECRET_KEY> - Keys used to access the object storage.

Bind the volume to a container

sudo docker run -it -v jfsvolume:/mnt busybox ls /mnt

Upgrade

sudo docker plugin upgrade juicefs  
sudo docker plugin enable juicefs

Uninstall

sudo docker plugin disable juicefs
sudo docker plugin rm juicefs

Troubleshooting

Please refer to troubleshooting.