jfrazee commented on a change in pull request #5213:
URL: https://github.com/apache/nifi/pull/5213#discussion_r672553049



##########
File path: nifi-docker/dockerhub/DockerBuild.sh
##########
@@ -13,24 +15,16 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-#!/bin/bash
-
-DOCKER_UID=1000
-if [ -n "$1" ]; then
-  DOCKER_UID="$1"
-fi
+set -e
+set -o pipefail
 
-DOCKER_GID=1000
-if [ -n "$2" ]; then
-  DOCKER_GID="$2"
-fi
+DOCKER_UID="${1:-1000}"
+DOCKER_GID="${2:-1000}"
+MIRROR="${3:-https://archive.apache.org/dist}";
+BASE="${4:-${MIRROR}}"

Review comment:
       Can I suggest we do the mirror handling for the user (either here or in 
the Dockerfile itself)? For example, you can determine whether to go to 
archive.a.o or not by checking the in_dist from the Apache closer.lua script:
   
   ```sh
   curl -sSLo - 
"https://www.apache.org/dyn/closer.lua/nifi/${NIFI_VERSION}/nifi-${NIFI_VERSION}-bin.zip?as_json&cca2=us";
 | \
       jq -r '(if .in_dist then .preferred else 
"https://archive.apache.org/dist/"; end) + .path_info'
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to