Docker Commands
Using this via AWS Marketplace? Replace
wyflow/mapfs:2.3 in the commands below with your AWS Marketplace ECR image address (e.g. <account-id>.dkr.ecr.<region>.amazonaws.com/wyflow/mapfs:2.3).
Help / Version
$ docker run --rm wyflow/mapfs:2.3 $ docker run --rm wyflow/mapfs:2.3 help $ docker run --rm wyflow/mapfs:2.3 version
License
# list the current license $ docker run --rm -v /etc/mapfs:/etc/mapfs:ro wyflow/mapfs:2.3 license list # import a license # docker run --rm -v /etc/mapfs:/etc/mapfs wyflow/mapfs:2.3 license import <email> <token> $ docker run --rm -v /etc/mapfs:/etc/mapfs wyflow/mapfs:2.3 license import <email> <token>
Add a volume
# docker run --rm -v /etc/mapfs:/etc/mapfs wyflow/mapfs:2.3 add <VolumeName> <CloudOptions> <CacheOptions>
Note: the directory used in "-v /var/cache/mapfs/my-volume:..." must already exist — docker will not create it automatically.
# for example
$ docker run --rm -v /etc/mapfs:/etc/mapfs \
-v /var/cache/mapfs/my-volume:/var/cache/mapfs/my-volume \
wyflow/mapfs:2.3 \
add my-volume S3Compatible -i admin -k administrator -b ulb.test -e http://192.168.97.128:9000 -d /var/cache/mapfs/my-volume -z 1
Configure cache parameters
# docker run --rm -v /etc/mapfs:/etc/mapfs -v <CacheDir>:<CacheDir> wyflow/mapfs:2.3 configure <VolumeName> cache_size=<GB>
$ docker run --rm -v /etc/mapfs:/etc/mapfs \
-v <CacheDir>:<CacheDir> \
wyflow/mapfs:2.3 \
configure <VolumeName> cache_size=<GB>
$ docker run --rm -v /etc/mapfs:/etc/mapfs \
wyflow/mapfs:2.3 \
configure <VolumeName> cache_timeout=<seconds>
List configured volumes
$ docker run --rm -v /etc/mapfs:/etc/mapfs:ro wyflow/mapfs:2.3 list
Delete a volume
$ docker run --rm -it -v /etc/mapfs:/etc/mapfs \
-v /var/cache/mapfs/my-volume:/var/cache/mapfs/my-volume \
wyflow/mapfs:2.3 delete <VolumeName>
Mount a volume
Note: "-v /sys/module/fuse/parameters/enable_uring:/sys/module/fuse/parameters/enable_uring" only works on Linux distributions running kernel 6.18+.
# mapfs mount <VolumeName> <MountPoint> [iouring]
$ docker run --rm -d \
--name mapfs-<VolumeName> \
-v /etc/mapfs:/etc/mapfs:ro \
-v /etc/os-release:/etc/os-release:ro \
-v <CacheDir>:<CacheDir> \
-v /var/run/mapfs:/var/run/mapfs \
-v /proc/meminfo:/proc/meminfo:ro \
[-v /sys/module/fuse/parameters/enable_uring:/sys/module/fuse/parameters/enable_uring] \
-v <MountPoint>:<MountPoint>:shared \
--device /dev/fuse \
--cap-add SYS_ADMIN \
wyflow/mapfs:2.3 \
mount <VolumeName> <MountPoint> [iouring]
# for example
$ docker run --rm -d \
--name mapfs-my-volume \
-v /etc/mapfs:/etc/mapfs:ro \
-v /etc/os-release:/etc/os-release:ro \
-v /var/cache/mapfs/my-volume:/var/cache/mapfs/my-volume \
-v /var/run/mapfs:/var/run/mapfs \
-v /proc/meminfo:/proc/meminfo:ro \
-v /mnt/fuse:/mnt/fuse:shared \
--device /dev/fuse \
--cap-add SYS_ADMIN \
wyflow/mapfs:2.3 \
mount my-volume /mnt/fuse
warm up cache
$ docker run --rm wyflow/mapfs:2.3 load <filename>
Get volume runtime status
$ docker run --rm -v /var/run/mapfs:/var/run/mapfs:ro \
wyflow/mapfs:2.3 stat
Unmount a volume
$ docker stop mapfs-<VolumeName>
List running mapfs containers
$ docker ps --filter 'name=mapfs-' \
--format 'table {{.Names}}\t{{.Status}}\t{{.Size}}\t{{.Mounts}}'
Check whether a container is running
$ docker inspect mapfs-<VolumeName>
$ docker inspect -f '{{.State.Running}}' mapfs-<VolumeName>
Logs
$ docker logs [-f] mapfs-<VolumeName> $ tail -f <CacheDir>/mapfs.log