Rancher multiple NFS mountpoints

In my previous blog I explained how to use the Rancher-NFS service. In this blog I will explain how you can add multiple NFS mountpoints to a container, by using this same Rancher-NFS driver. It is important that your Rancher version is at least 1.6.0 and that the Rancher-NFS service is upgraded to v0.8.3.

This upgrade brings the following driver options;

Unfortunately, as far as I know, this cannot be done in the UI yet.

Below a simple configuration I used to test this out on a simple Ubuntu container, which will get two mountpoints;

  1. The /root folder will be mounted to the default Rancher share on my NFS server and will create a folder there named ‘test’.
  2. The /uploads folder will be created and mounted to my uploads folder on my NFS server

This will result in the following configuration changes in the docker-compose.yml file.

The rancher-compose.yml doesn’t need any modification.
For completeness below the comple docker-compose.yml.


Facebooktwittergoogle_plusredditpinterestlinkedinmailby feather

One Reply to “Rancher multiple NFS mountpoints”

Leave a Reply

Your email address will not be published. Required fields are marked *