This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
commit 2ee12b8678a0fe6ed371599953606b7ad4852e8c Author: FreeOnePlus <54164178+freeonep...@users.noreply.github.com> AuthorDate: Mon Mar 11 22:19:33 2024 +0800 [improvement](docker)Optimize Dockerfile content for FE and BE (#32027) * Refactor upgrade documentation * Optimize Dockerfile content for FE and BE. * Optimize Dockerfile content for FE and BE. --------- Co-authored-by: Yijia Su <suyi...@selectdb.com> --- docker/runtime/be/Dockerfile | 7 +++++-- docker/runtime/fe/Dockerfile | 11 +++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/docker/runtime/be/Dockerfile b/docker/runtime/be/Dockerfile index 0833b44d1ff..e890f053237 100644 --- a/docker/runtime/be/Dockerfile +++ b/docker/runtime/be/Dockerfile @@ -31,7 +31,10 @@ FROM ubuntu:22.04 ARG TARGETARCH -RUN apt-get update -y && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ +ARG DORIS_VERSION="x.x.x" + +RUN sed -i -e 's/^APT/# APT/' -e 's/^DPkg/# DPkg/' /etc/apt/apt.conf.d/docker-clean && \ + apt-get update -y && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ patchelf gdb binutils binutils-common mysql-client \ curl wget less vim htop iproute2 numactl jq iotop sysstat \ tcpdump iputils-ping dnsutils strace lsof blktrace tzdata \ @@ -44,7 +47,7 @@ ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-${TARGETARCH:-amd64} \ PATH="/opt/apache-doris/be/bin:${PATH}" # apache-doris/be from doris release xxxx.tar.gz.please update the version in follows x.x.x. -ADD resource/apache-doris-x.x.x-bin-${TARGETARCH:-amd64}/be /opt/apache-doris/be +ADD resource/apache-doris-${DORIS_VERSION}-bin-${TARGETARCH:-amd64}/be /opt/apache-doris/be COPY resource/be_*.sh /opt/apache-doris/ diff --git a/docker/runtime/fe/Dockerfile b/docker/runtime/fe/Dockerfile index ce1b75c0260..6ef16b9ccd7 100644 --- a/docker/runtime/fe/Dockerfile +++ b/docker/runtime/fe/Dockerfile @@ -30,14 +30,17 @@ FROM ubuntu:22.04 ARG TARGETARCH +ARG DORIS_VERSION="x.x.x" + # set environment variables ENV JAVA_HOME=/usr/lib/jvm/java-8-openjdk-${TARGETARCH:-amd64} \ PATH="/opt/apache-doris/fe/bin:${PATH}" # apache-doris/fe from doris release tar.gz, please update the version in follows x.x.x. -COPY resource/apache-doris-x.x.x-bin-${TARGETARCH:-amd64}/fe /opt/apache-doris/fe +COPY resource/apache-doris-${DORIS_VERSION}-bin-${TARGETARCH:-amd64}/fe /opt/apache-doris/fe -RUN apt-get update -y && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ +RUN sed -i -e 's/^APT/# APT/' -e 's/^DPkg/# DPkg/' /etc/apt/apt.conf.d/docker-clean && \ + apt-get update -y && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ patchelf gdb binutils binutils-common mysql-client \ curl wget less vim htop iproute2 numactl jq iotop sysstat tzdata \ tcpdump iputils-ping dnsutils strace lsof blktrace \ @@ -45,10 +48,10 @@ RUN apt-get update -y && DEBIAN_FRONTEND=noninteractive apt-get install -y --no net-tools openjdk-8-jdk && \ rm -rf /var/lib/apt/lists/* -ADD resource/init_fe.sh /opt/apache-doris/fe/bin/ +ADD resource/init_fe.sh /usr/local/bin/ COPY resource/fe_*.sh /opt/apache-doris/ WORKDIR /opt/apache-doris -ENTRYPOINT ["/opt/apache-doris/fe/bin/init_fe.sh"] +ENTRYPOINT ["bash","init_fe.sh"] --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org