Docker Basic Operation
Show docker volume list
[root@sunny ~]# docker volume ls
DRIVER VOLUME NAME
local b09d0a175d914c7f24fcf877aeeb232f80d348b87e52841f8fc388d606c34247
rexray rexray_isilon_1
rexray rexray_isilon_2
rexray test_at_isilon_ifs_volumes
Show docker image list
[root@sunny ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
centos latest 3bee3060bfc8 10 days ago 193 MB
friendlyhello latest d058024f6d16 3 weeks ago 195 MB
python 2.7-slim 1c7128a655f6 5 weeks ago 183 MB
debian jessie 3e83c23dba6a 5 weeks ago 124 MB
debian latest 3e83c23dba6a 5 weeks ago 124 MB
hello-world latest 48b5124b2768 5 months ago 1.84 kB
Docker Container Operation
Create a new container
Used REX-Ray volume "rexray_isilon_1" and "centos" image to run a new container.
[root@sunny ~]# docker run -it -v rexray_isilon_1:/mnt centos:latest /bin/bash
Confirmed /ifs/volumes/rexray_isilon_1 was mounted at /mnt
[root@89a04fa09cc2 /]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/docker-253:0-134453907-9bfae4440e565d8293448572183c94d408c9a297a39b4284f91eeaca328ecb86 10474496 241716 10232780 3% /
tmpfs 1941352 0 1941352 0% /dev
tmpfs 1941352 0 1941352 0% /sys/fs/cgroup
192.168.20.40:/ifs/volumes/rexray_isilon_1/data 180613632 2964992 177648640 2% /mnt
/dev/mapper/centos-root 39265556 3974456 35291100 11% /etc/hosts
shm 65536 0 65536 0% /dev/shm
tmpfs 1941352 0 1941352 0% /sys/firmware
Write on a container
Created a file to test if the REX-Ray volume was writable.
[root@89a04fa09cc2 /]# cd /mnt
[root@89a04fa09cc2 mnt]# ls
[root@89a04fa09cc2 mnt]# touch centos_test
[root@89a04fa09cc2 mnt]# ls
centos_test
[root@89a04fa09cc2 mnt]# vi centos_test
[root@89a04fa09cc2 mnt]# cat centos_test
test
Access to the same REX-Ray volume from different containers
Opened a new sessoin via ssh, then checked currently running containers. In the list, there was the container started earlier.
[root@sunny ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
83ad1fd603e9 centos:latest "/bin/bash" 28 minutes ago Up 28 minutes keen_davinci
Then, started a new container on the other session using the same REX-Ray volume "rexray_isilon_1".
[root@sunny ~]# docker run -it -v rexray_isilon_1:/mnt centos:latest /bin/bash
[root@83ad1fd603e9 /]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/docker-253:0-134453907-9bfae4440e565d8293448572183c94d408c9a297a39b4284f91eeaca328ecb86 10474496 241716 10232780 3% /
tmpfs 1941352 0 1941352 0% /dev
tmpfs 1941352 0 1941352 0% /sys/fs/cgroup
192.168.20.40:/ifs/volumes/rexray_isilon_1/data 180613632 2964480 177649152 2% /mnt
/dev/mapper/centos-root 39265556 3924724 35340832 10% /etc/hosts
shm 65536 0 65536 0% /dev/shm
tmpfs 1941352 0 1941352 0% /sys/firmware
There was the same test file created earlier by the other container. As a result, the Isilon NFS was sucessfully shared by 2 containers.
[root@83ad1fd603e9 /]# ls /mnt
centos_test