From 9eb058ff453be6c5dbb1a30aa82951fa48a817e9 Mon Sep 17 00:00:00 2001 From: Till Prochaska <1512805+tillprochaska@users.noreply.github.com> Date: Sat, 6 Jan 2024 14:13:22 +0100 Subject: [PATCH] Build using devtoolset-7 as Meilisearch now requires newer glibc versions than the default on CentOS 7 --- Dockerfile | 8 ++++++-- scripts/build | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 468adc5..994ce40 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,12 @@ FROM centos:7 ARG MEILISEARCH_VERSION +# Install newer version of gcc etc. +RUN yum install -y centos-release-scl +RUN yum -y install devtoolset-7-gcc + # Install Rust -RUN yum group install -y "Development Tools" +RUN yum -y groupinstall "Development Tools" RUN curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y # Download and extract Meilisearch source @@ -11,4 +15,4 @@ RUN tar zxf meilisearch.tar.gz # Build WORKDIR "meilisearch-${MEILISEARCH_VERSION}" -RUN ~/.cargo/bin/cargo build --release +RUN scl enable devtoolset-7 "~/.cargo/bin/cargo build --release" diff --git a/scripts/build b/scripts/build index 48678ee..af8e217 100755 --- a/scripts/build +++ b/scripts/build @@ -4,6 +4,7 @@ set -e # Build Meilisearch binary in Docker docker build \ + --platform linux/amd64 \ --tag meilisearch-centos7:${MEILISEARCH_VERSION} \ --build-arg MEILISEARCH_VERSION=${MEILISEARCH_VERSION} \ .