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} \ .