Gluster Client Containers or containers capable of mounting Gluster Volumes.

I have been receiving lots of queries on whether we can mount GlusterFS from the container ? or Gluster Client containers are available ?
Yes, it is. Today I refreshed this image to fedora24, so the blog.
The process to use gluster client containers are simple as shown below:

[Update: the same docker image can be found at https://hub.docker.com/r/gluster/gluster-client/ ]

#docker pull humble/gluster-client

Then run the container as

[root@localhost gluster-client]# docker run -d -ti –privileged humble/gluster-client bash
7d8dfbf8e4dbb841b240cc196682c77aad7c30cc4511d906cab275cd326b4755

[root@localhost gluster-client]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7d8dfbf8e4db humble/gluster-client "bash" 6 seconds ago Up 2 seconds high_cray
[root@localhost gluster-client]# docker exec -ti 7d8dfbf8e4db bash

[root@7d8dfbf8e4db /]# glusterd –version
glusterfs 3.8.4 built on Sep 10 2016 16:42:36
Repository revision: git://git.gluster.com/glusterfs.git
Copyright (c) 2006-2013 Red Hat, Inc.
GlusterFS comes with ABSOLUTELY NO WARRANTY.It is licensed to you under your choice of the GNU Lesser
General Public License, version 3 or any later version (LGPLv3 or later), or the GNU General Public License, version 2 (GPLv2), in all cases as published by the Free Software Foundation.
[root@7d8dfbf8e4db /]#cat /etc/redhat-release
Fedora release 24 (Twenty Four)
[root@7d8dfbf8e4db /]#

Make sure “FUSE” device exist in the container as shown below.

[root@localhost gluster-client]# ll /dev/fuse
crw-rw-rw-. 1 root root 10, 229 Sep 18 03:03 /dev/fuse
[root@localhost gluster-client]#

I have a gluster volume exported from another server and would like to mount it inside this container.

[root@7d8dfbf8e4db /]# mount -t glusterfs 192.168.43.149:/myVol1 /mnt
WARNING: getfattr not found, certain checks will be skipped..
[root@7d8dfbf8e4db mnt]# mount |grep gluster
192.168.43.149:/myVol1 on /mnt type fuse.glusterfs (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,max_read=131072)
[root@7d8dfbf8e4db mnt]#
[root@7d8dfbf8e4db /]# cd /mnt
[root@7d8dfbf8e4db mnt]# ls
[root@7d8dfbf8e4db mnt]# touch Hi
[root@7d8dfbf8e4db mnt]#

Thats it.

I will automate the build in docker hub and move this image to gluster official account soon.