rockstor / rockstor-core

Linux/BTRFS based Network Attached Storage(NAS)
http://rockstor.com/docs/contribute_section.html
GNU General Public License v3.0
552 stars 137 forks source link

Rockon: allow mounting of single file #1568

Open daniel-illi opened 7 years ago

daniel-illi commented 7 years ago

Currently the rock-on service allows mounting a share as a volume. Many existing docker images expect a single file to be mounted. On the command line it is easily possible to mount a single file with docker with the -v flag.

I would like to be able to mount a single file. Ideally I'd like to be able to choose the file to mount in the rock-on configuration wizard with a file picker. Alternatively a simple text input field could be used to manually type the desired file path.

Example: The original haproxy-letsencrypt docker container on which my rock-on is built, expects the configuration file /usr/local/etc/haproxy/haproxy.cfg to be mounted. To get the docker image to work with the rock-on service, I had to build a docker image which inherits from the original one and allows mounting a directory and links the correct file to the expected location. This works but it increases the maintenance costs as I have to rebuild the image for each new version of the original image.

FroggyFlox commented 5 years ago

I second this need, so this could be indeed a beneficial feature. One could implement that as a new object "file" that would in turn trigger a file picker/uploaded during the rock-on installation wizard.

Where to store the file in question, however? I'm not sure how to handle that as if one needs to create a share dedicated for a single file, it would be problematic. That would still be the case if this share also contains similar configuration files required for other rock-ons. Could a system path such as '/opt/` be created for this purpose in a similar way that config backups are stored on the system?