From 045c30f89c9bbe55f2362107ab366a74f91d4d2e Mon Sep 17 00:00:00 2001 From: 5kbpers Date: Fri, 26 Mar 2021 11:05:24 +0800 Subject: [PATCH] Dockerfile: fix build failure (#9887) Signed-off-by: 5kbpers Co-authored-by: Ti Chi Robot <71242396+ti-chi-bot@users.noreply.github.com> --- Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7f463603418..dddda9848f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,10 +38,10 @@ RUN yum install -y epel-release && \ yum clean all && \ yum makecache -RUN yum install -y \ - perl \ - make cmake3 dwz \ - gcc gcc-c++ libstdc++-static && \ +RUN yum install -y centos-release-scl && \ + yum install -y \ + devtoolset-8 \ + perl cmake3 && \ yum clean all # CentOS gives cmake 3 a weird binary name, so we link it to something more normal @@ -77,7 +77,7 @@ RUN mkdir -p ./cmd/src/bin && \ done COPY Makefile ./ -RUN make build_dist_release +RUN source /opt/rh/devtoolset-8/enable && make build_dist_release # Remove fingerprints for when we build the real binaries. RUN rm -rf ./target/release/.fingerprint/tikv-* && \ @@ -98,7 +98,7 @@ ARG GIT_BRANCH=${GIT_FALLBACK} ENV TIKV_BUILD_GIT_HASH=${GIT_HASH} ENV TIKV_BUILD_GIT_TAG=${GIT_TAG} ENV TIKV_BUILD_GIT_BRANCH=${GIT_BRANCH} -RUN make build_dist_release +RUN source /opt/rh/devtoolset-8/enable && make build_dist_release # Export to a clean image FROM pingcap/alpine-glibc