docker-nfs-server
docker-nfs-server copied to clipboard
Documentation update needed for describing binding export folders through environment variables
Using quotes ('/") won't work, resulting in this log:
----> WARNING: skipping NFS_EXPORT_1 environment variable since '/mnt/disk1 is not a container directory,
----> collected 0 valid export(s) from NFS_EXPORT_* environment variables,
----> ERROR: no valid exports,
provide each line of /etc/exports as an environment variable
The container will look for environment variables that start with NFS_EXPORT_ and end with an integer. e.g. NFS_EXPORT_0, NFS_EXPORT_1, etc.
docker run \
-e NFS_EXPORT_0='/container/path/foo *(ro,no_subtree_check)' \
-e NFS_EXPORT_1='/container/path/bar 123.123.123.123/32(rw,no_subtree_check)' \
... \
erichough/nfs-server
Correct:
provide each line of /etc/exports as an environment variable
The container will look for environment variables that start with NFS_EXPORT_ and end with an integer. e.g. NFS_EXPORT_0, NFS_EXPORT_1, etc.
docker run \
-e NFS_EXPORT_0=/container/path/foo *(ro,no_subtree_check) \
-e NFS_EXPORT_1=/container/path/bar 123.123.123.123/32(rw,no_subtree_check) \
... \
erichough/nfs-server