From 2ba68e15f3cbe8853077f77e94a5d19a274591e9 Mon Sep 17 00:00:00 2001 From: Johannes Kalmbach Date: Tue, 5 Nov 2024 15:14:57 +0100 Subject: [PATCH] Update Dockerfile --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7916924046..bf1b030e94 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,12 @@ FROM ubuntu:22.04 as base +ARG TARGETPLATFORM LABEL maintainer="Johannes Kalmbach " ENV LANG C.UTF-8 ENV LC_ALL C.UTF-8 ENV LC_CTYPE C.UTF-8 ENV DEBIAN_FRONTEND=noninteractive +RUN echo "Building for platform ->$TARGETPLATFORM<-" +RUN if [[ $TARGETPLATFORM -eq "linux/arm64"] ; then echo "target is ARM"; else echo "target is not ARM, probably AMD64"; fi RUN apt-get update && apt-get install -y software-properties-common wget && add-apt-repository -y ppa:mhier/libboost-latest RUN wget https://apt.kitware.com/kitware-archive.sh && chmod +x kitware-archive.sh &&./kitware-archive.sh @@ -19,7 +22,7 @@ ENV DEBIAN_FRONTEND=noninteractive WORKDIR /app/build/ RUN cmake -DCMAKE_BUILD_TYPE=Release -DLOGLEVEL=INFO -DUSE_PARALLEL=true -D_NO_TIMING_TESTS=ON -GNinja .. RUN echo "Building for platform ->$TARGETPLATFORM<-" -RUN if ["$TARGETPLATFORM" = "linux/arm64"] ; then cmake --build . --target IndexBuilderMain ServerMain; else cmake --build . ; fi +RUN if [[ $TARGETPLATFORM -eq "linux/arm64"] ; then cmake --build . --target IndexBuilderMain ServerMain; else cmake --build . ; fi RUN ctest --rerun-failed --output-on-failure FROM base as runtime