Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dev-support/bin/create-release
Original file line number Diff line number Diff line change
Expand Up @@ -504,9 +504,9 @@ function dockermode
echo "LABEL org.apache.hadoop.create-release=\"cr-${RANDOM}\""

# setup ownerships, etc
echo "RUN groupadd --non-unique -g ${group_id} ${user_name}"
echo "RUN useradd -g ${group_id} -u ${user_id} -m ${user_name}"
echo "RUN chown -R ${user_name} /home/${user_name}"
echo "RUN groupadd --non-unique -g ${group_id} ${user_name}; exit 0;"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to check if this command execute successfully or not here?

Copy link
Contributor Author

@slfan1989 slfan1989 Jan 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for reviewing this PR! Once an error occurs in the RUN script, the image building process is terminated. The error I encountered does not block the overall compilation process, so I added exit 0. I hope that even if there is an error, the subsequent compilation process can continue.

echo "RUN useradd -g ${group_id} -u ${user_id} -m ${user_name}; exit 0;"
echo "RUN chown -R ${user_name} /home/${user_name}; exit 0;"
echo "ENV HOME /home/${user_name}"
echo "RUN mkdir -p /maven"
echo "RUN chown -R ${user_name} /maven"
Expand Down