Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation update needed for describing binding export folders through environment variables #83

Open
cybericius opened this issue Jan 13, 2024 · 0 comments

Comments

@cybericius
Copy link

cybericius commented Jan 13, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant