Skip to content

Commit

Permalink
[Tool] dockerfile enhancement (backport #30736) (#30793)
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin Cai <caixiaohua@starrocks.com>
  • Loading branch information
mergify[bot] and kevincai authored Sep 13, 2023
1 parent 64836a8 commit e799ef4
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docker/dockerfiles/allin1/allin1-ubi.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ COPY docker/dockerfiles/allin1/*.sh docker/dockerfiles/allin1/*.conf docker/dock
COPY docker/dockerfiles/allin1/services/ $SR_HOME
RUN cat be.conf >> $DEPLOYDIR/starrocks/be/conf/be.conf && \
cat fe.conf >> $DEPLOYDIR/starrocks/fe/conf/fe.conf && \
mkdir -p $DEPLOYDIR/starrocks/fe/meta && mkdir -p $DEPLOYDIR/starrocks/be/storage && touch /.dockerenv
rm -f be.conf fe.conf && \
mkdir -p $DEPLOYDIR/starrocks/fe/meta $DEPLOYDIR/starrocks/be/storage && touch /.dockerenv

CMD ./entrypoint.sh
3 changes: 2 additions & 1 deletion docker/dockerfiles/allin1/allin1-ubuntu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ COPY docker/dockerfiles/allin1/services/ $SR_HOME

RUN cat be.conf >> $DEPLOYDIR/starrocks/be/conf/be.conf && \
cat fe.conf >> $DEPLOYDIR/starrocks/fe/conf/fe.conf && \
mkdir -p $DEPLOYDIR/starrocks/fe/meta && mkdir -p $DEPLOYDIR/starrocks/be/storage && touch /.dockerenv
rm -f be.conf fe.conf && \
mkdir -p $DEPLOYDIR/starrocks/fe/meta $DEPLOYDIR/starrocks/be/storage && touch /.dockerenv

CMD ./entrypoint.sh
9 changes: 9 additions & 0 deletions docker/dockerfiles/be/be_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,12 @@ if [[ "x$LOG_CONSOLE" == "x1" ]] ; then
addition_args="--logconsole"
fi
$STARROCKS_HOME/bin/start_be.sh $addition_args
ret=$?
if [[ $ret -ne 0 && "x$LOG_CONSOLE" != "x1" ]] ; then
nol=50
log_stderr "Last $nol lines of be.INFO ..."
tail -n 50 $STARROCKS_HOME/log/be.INFO
log_stderr "Last $nol lines of be.out ..."
tail -n 50 $STARROCKS_HOME/log/be.out
fi
exit $ret
9 changes: 9 additions & 0 deletions docker/dockerfiles/be/cn_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,12 @@ if [[ "x$LOG_CONSOLE" == "x1" ]] ; then
addition_args="--logconsole"
fi
$STARROCKS_HOME/bin/start_cn.sh $addition_args
ret=$?
if [[ $ret -ne 0 && "x$LOG_CONSOLE" != "x1" ]] ; then
nol=50
log_stderr "Last $nol lines of cn.INFO ..."
tail -n $nol $STARROCKS_HOME/log/cn.INFO
log_stderr "Last $nol lines of cn.out ..."
tail -n $nol $STARROCKS_HOME/log/cn.out
fi
exit $ret

0 comments on commit e799ef4

Please sign in to comment.