[
https://issues.apache.org/jira/browse/HADOOP-19807?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18057479#comment-18057479
]
ASF GitHub Bot commented on HADOOP-19807:
-----------------------------------------
pan3793 commented on code in PR #8235:
URL: https://github.com/apache/hadoop/pull/8235#discussion_r2785475665
##########
start-build-env.sh:
##########
@@ -98,15 +102,15 @@ ENV HOME="${DOCKER_HOME_DIR}"
UserSpecificDocker
-#If this env varible is empty, docker will be started
+# If this env variable is empty, docker will be started
# in non interactive mode
DOCKER_INTERACTIVE_RUN=${DOCKER_INTERACTIVE_RUN-"-i -t"}
# By mapping the .m2 directory you can do an mvn install from
# within the container and use the result on your normal
# system. And this also is a significant speedup in subsequent
# builds because the dependencies are downloaded only once.
-docker run --rm=true $DOCKER_INTERACTIVE_RUN \
+docker run "${DOCKER_PLATFORM_ARGS[@]}" --rm=true ${DOCKER_INTERACTIVE_RUN} \
Review Comment:
I kept ·${DOCKER_INTERACTIVE_RUN}· unquoted because it's intentionally
designed to expand to multiple arguments `-i -t` or be empty. This is a
legitimate use case where word splitting is desired. Fix that need to convert
it to an array too, but that would require changing how it's set and used
throughout the script.
##########
start-build-env.sh:
##########
@@ -98,15 +102,15 @@ ENV HOME="${DOCKER_HOME_DIR}"
UserSpecificDocker
-#If this env varible is empty, docker will be started
+# If this env variable is empty, docker will be started
# in non interactive mode
DOCKER_INTERACTIVE_RUN=${DOCKER_INTERACTIVE_RUN-"-i -t"}
# By mapping the .m2 directory you can do an mvn install from
# within the container and use the result on your normal
# system. And this also is a significant speedup in subsequent
# builds because the dependencies are downloaded only once.
-docker run --rm=true $DOCKER_INTERACTIVE_RUN \
+docker run "${DOCKER_PLATFORM_ARGS[@]}" --rm=true ${DOCKER_INTERACTIVE_RUN} \
Review Comment:
I kept `${DOCKER_INTERACTIVE_RUN}` unquoted because it's intentionally
designed to expand to multiple arguments `-i -t` or be empty. This is a
legitimate use case where word splitting is desired. Fix that need to convert
it to an array too, but that would require changing how it's set and used
throughout the script.
> Enable cross-platform support for dev container
> -----------------------------------------------
>
> Key: HADOOP-19807
> URL: https://issues.apache.org/jira/browse/HADOOP-19807
> Project: Hadoop Common
> Issue Type: Improvement
> Components: build
> Affects Versions: 3.5.0
> Reporter: Cheng Pan
> Priority: Major
> Labels: pull-request-available
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]