How To Use ObjectiveFS with Docker
ObjectiveFS provides a persistent storage between sessions for your Docker containers. It also provides shared storage between containers.
There are two ways to use ObjectiveFS with Docker.
A. Run ObjectiveFS on the host and share it with the container
Example steps:
Mount filesystem on host at /ofs
$ mount.objectivefs <filesystem> /ofs
Run docker
$ docker run -it -v /ofs:/ofs ubuntu /bin/bash
B. Run ObjectiveFS inside the container
Run docker with the following options:
--security-opt apparmor:unconfined --cap-add sys_admin --device=/dev/fuse
Make sure /etc/objectivefs.env is setup (see configure step)
Mount objectivefs inside the container with a regular mount command
$ mount.objectivefs <filesystem> <directory>
References
- Mount Command and Options
- Configure Command
- How To Mount an Instance Store on EC2 for Disk Cache
- How To Restrict S3 Bucket Policy to Only One S3 Bucket
Last updated ObjectiveFS staff
ObjectiveFS is a shared file system for Linux and macOS that automatically scales and gives you scalable cloud storage. If you have questions or article idea suggestions, please email us at support@objectivefs.com