From aad744635c960d384f88664d813ef0d68d91510c Mon Sep 17 00:00:00 2001 From: Eric Hough Date: Mon, 25 Nov 2019 11:13:20 -0800 Subject: [PATCH 1/3] fix a few broken links in README, add a link to discussion re: rpcbind timeout --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 306702b..cec4135 100644 --- a/README.md +++ b/README.md @@ -26,14 +26,14 @@ This is the only containerized NFS server that offers **all** of the following f * Optional features * [Debug logging](doc/feature/logging.md) * [Kerberos security](doc/feature/kerberos.md) - * [NFSv4 user ID mapping](doc/feature/nfsv4-user-id-mapping.md) + * [NFSv4 user ID mapping](doc/feature/nfs4-user-id-mapping.md) * [AppArmor integration](doc/feature/apparmor.md) * Advanced * [automatically load required kernel modules](doc/feature/auto-load-kernel-modules.md) * [custom server ports](doc/advanced/ports.md) * [custom NFS versions offered](doc/advanced/nfs-versions.md) * [performance tuning](doc/advanced/performance-tuning.md) -* [Help!](#help!) +* [Help!](#help) * [Remaining tasks](#remaining-tasks) * [Acknowledgements](#acknowledgements) @@ -163,8 +163,8 @@ Please [open an issue](https://github.com/ehough/docker-nfs-server/issues) if yo ## Remaining tasks -- figure out why `rpc.nfsd` takes 5 minutes to startup/timeout unless `rpcbind` is running -- add more examples, including Docker Compose +- figure out why `rpc.nfsd` [takes 5 minutes to startup/timeout](https://www.spinics.net/lists/linux-nfs/msg59728.html) unless `rpcbind` is running +- add more examples ## Acknowledgements From e2c679c178a237a042d8da7290a9e49ca6380316 Mon Sep 17 00:00:00 2001 From: Eric Hough Date: Thu, 6 Feb 2020 15:43:00 -0800 Subject: [PATCH 2/3] use pure bash for uppercasing strings. fixes #36 --- CHANGELOG.md | 5 +++++ entrypoint.sh | 17 ++++------------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd9e17e..2308d10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [unreleased] + +### Changed +* Use pure Bash for uppercasing strings ([#36](https://github.com/ehough/docker-nfs-server/issues/36)) + ## [2.2.1] - 2019-03-15 ### Fixed diff --git a/entrypoint.sh b/entrypoint.sh index 778c64e..a9f963e 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -5,7 +5,7 @@ # https://hub.docker.com/r/erichough/nfs-server # https://github.com/ehough/docker-nfs-server # -# Copyright (C) 2017-2019 Eric D. Hough +# Copyright (C) 2017-2020 Eric D. Hough # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -75,16 +75,6 @@ readonly STATE_NFS_VERSION='nfs_version' declare -A state -###################################################################################### -### string utils -###################################################################################### - -toupper() { - - echo "$1" | awk '{ print toupper($0) }' -} - - ###################################################################################### ### logging ###################################################################################### @@ -110,7 +100,7 @@ log_header() { echo " ================================================================== - $(toupper "$1") + ${1^^} ==================================================================" } @@ -341,7 +331,8 @@ assert_port() { init_state_logging() { # if the user didn't request a specific log level, the default is INFO - local -r normalized_log_level=$(toupper "${!ENV_VAR_NFS_LOG_LEVEL:-$LOG_LEVEL_INFO}") + local incoming_log_level="${!ENV_VAR_NFS_LOG_LEVEL:-$LOG_LEVEL_INFO}" + local -r normalized_log_level="${incoming_log_level^^}" if ! echo "$normalized_log_level" | grep -Eq 'DEBUG|INFO'; then bail "the only acceptable values for $ENV_VAR_NFS_LOG_LEVEL are: DEBUG, INFO" From f97055c848d80fd97b688109255e6d9b95b77355 Mon Sep 17 00:00:00 2001 From: Eric Hough Date: Thu, 6 Feb 2020 16:01:25 -0800 Subject: [PATCH 3/3] fixing broken links in README. fixes #29 and #35 --- CHANGELOG.md | 3 +++ README.md | 44 ++++++++++++++++++++++---------------------- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2308d10..948d068 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [unreleased] +### Fixed +* Broken links in README, both on GitHub and Docker Hub ([#29](https://github.com/ehough/docker-nfs-server/issues/29), [#35](https://github.com/ehough/docker-nfs-server/issues/35)) + ### Changed * Use pure Bash for uppercasing strings ([#36](https://github.com/ehough/docker-nfs-server/issues/36)) diff --git a/README.md b/README.md index cec4135..7bb7668 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,11 @@ This is the only containerized NFS server that offers **all** of the following f - clean teardown of services upon termination (no lingering `nfsd` processes on Docker host) - flexible construction of `/etc/exports` - extensive server configuration via environment variables -- human-readable logging (with a helpful [debug mode](doc/feature/logging.md)) +- human-readable logging (with a helpful [debug mode](https://github.com/ehough/docker-nfs-server/blob/develop/doc/feature/logging.md)) - *optional* bonus features - - [Kerberos security](doc/feature/kerberos.md) - - [NFSv4 user ID mapping](doc/feature/nfs4-user-id-mapping.md) via [`idmapd`](http://man7.org/linux/man-pages/man8/idmapd.8.html) - - [AppArmor](doc/feature/apparmor.md) compatibility + - [Kerberos security](https://github.com/ehough/docker-nfs-server/blob/develop/doc/feature/kerberos.md) + - [NFSv4 user ID mapping](https://github.com/ehough/docker-nfs-server/blob/develop/doc/feature/nfs4-user-id-mapping.md) via [`idmapd`](http://man7.org/linux/man-pages/man8/idmapd.8.html) + - [AppArmor](https://github.com/ehough/docker-nfs-server/blob/develop/doc/feature/apparmor.md) compatibility ## Table of Contents @@ -24,15 +24,15 @@ This is the only containerized NFS server that offers **all** of the following f * [Starting the server](#starting-the-server) * [Mounting filesystems from a client](#mounting-filesystems-from-a-client) * Optional features - * [Debug logging](doc/feature/logging.md) - * [Kerberos security](doc/feature/kerberos.md) - * [NFSv4 user ID mapping](doc/feature/nfs4-user-id-mapping.md) - * [AppArmor integration](doc/feature/apparmor.md) + * [Debug logging](https://github.com/ehough/docker-nfs-server/blob/develop/doc/feature/logging.md) + * [Kerberos security](https://github.com/ehough/docker-nfs-server/blob/develop/doc/feature/kerberos.md) + * [NFSv4 user ID mapping](https://github.com/ehough/docker-nfs-server/blob/develop/doc/feature/nfs4-user-id-mapping.md) + * [AppArmor integration](https://github.com/ehough/docker-nfs-server/blob/develop/doc/feature/apparmor.md) * Advanced - * [automatically load required kernel modules](doc/feature/auto-load-kernel-modules.md) - * [custom server ports](doc/advanced/ports.md) - * [custom NFS versions offered](doc/advanced/nfs-versions.md) - * [performance tuning](doc/advanced/performance-tuning.md) + * [automatically load required kernel modules](https://github.com/ehough/docker-nfs-server/blob/develop/doc/feature/auto-load-kernel-modules.md) + * [custom server ports](https://github.com/ehough/docker-nfs-server/blob/develop/doc/advanced/ports.md) + * [custom NFS versions offered](https://github.com/ehough/docker-nfs-server/blob/develop/doc/advanced/nfs-versions.md) + * [performance tuning](https://github.com/ehough/docker-nfs-server/blob/develop/doc/advanced/performance-tuning.md) * [Help!](#help) * [Remaining tasks](#remaining-tasks) * [Acknowledgements](#acknowledgements) @@ -48,7 +48,7 @@ This is the only containerized NFS server that offers **all** of the following f `modprobe {nfs,nfsd,rpcsec_gss_krb5}` - or you can just allow the container to [load them automatically](doc/feature/auto-load-kernel-modules.md). + or you can just allow the container to [load them automatically](https://github.com/ehough/docker-nfs-server/blob/develop/doc/feature/auto-load-kernel-modules.md). 1. The container will need to run with `CAP_SYS_ADMIN` (or `--privileged`). This is necessary as the server needs to mount several filesystems *inside* the container to support its operation, and performing mounts from inside a container is impossible without these capabilities. 1. The container will need local access to the files you'd like to serve via NFS. You can use Docker volumes, bind mounts, files baked into a custom image, or virtually any other means of supplying files to a Docker container. @@ -121,7 +121,7 @@ Let's break that command down into its individual pieces to see what's required 1. **Expose the server ports** - You'll need to open up at least one server port for your client connections. The ports listed in the examples below are the defaults used by this image and most can be [customized](doc/ports.md). + You'll need to open up at least one server port for your client connections. The ports listed in the examples below are the defaults used by this image and most can be [customized](https://github.com/ehough/docker-nfs-server/blob/develop/doc/advanced/ports.md). * If your clients connect via **NFSv4 only**, you can get by with just TCP port `2049`: @@ -145,17 +145,17 @@ If you pay close attention to each of the items in this section, the server shou ## Optional Features - * [Debug logging](doc/feature/logging.md) - * [Kerberos security](doc/feature/kerberos.md) - * [NFSv4 user ID mapping](doc/feature/nfs4-user-id-mapping.md) - * [AppArmor integration](doc/feature/apparmor.md) + * [Debug logging](https://github.com/ehough/docker-nfs-server/blob/develop/doc/feature/logging.md) + * [Kerberos security](https://github.com/ehough/docker-nfs-server/blob/develop/doc/feature/kerberos.md) + * [NFSv4 user ID mapping](https://github.com/ehough/docker-nfs-server/blob/develop/doc/feature/nfs4-user-id-mapping.md) + * [AppArmor integration](https://github.com/ehough/docker-nfs-server/blob/develop/doc/feature/apparmor.md) ## Advanced - * [automatically load required kernel modules](doc/feature/auto-load-kernel-modules.md) - * [customizing which ports are used](doc/advanced/ports.md) - * [customizing NFS versions offered](doc/advanced/nfs-versions.md) - * [performance tuning](doc/advanced/performance-tuning.md) + * [automatically load required kernel modules](https://github.com/ehough/docker-nfs-server/blob/develop/doc/feature/auto-load-kernel-modules.md) + * [customizing which ports are used](https://github.com/ehough/docker-nfs-server/blob/develop/doc/advanced/ports.md) + * [customizing NFS versions offered](https://github.com/ehough/docker-nfs-server/blob/develop/doc/advanced/nfs-versions.md) + * [performance tuning](https://github.com/ehough/docker-nfs-server/blob/develop/doc/advanced/performance-tuning.md) ## Help!