Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
joka921 authored Nov 5, 2024
1 parent 2ba68e1 commit 555f3e0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ 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 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

FROM base as builder
ARG 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 build-essential cmake libicu-dev tzdata pkg-config uuid-runtime uuid-dev git libjemalloc-dev ninja-build libzstd-dev libssl-dev libboost1.81-dev libboost-program-options1.81-dev libboost-iostreams1.81-dev libboost-url1.81-dev

RUN if [[ $TARGETPLATFORM -eq "linux/arm64"]] ; then echo "target is ARM"; else echo "target is not ARM, probably AMD64"; fi
COPY . /app/

WORKDIR /app/
Expand All @@ -22,7 +23,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 -eq "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
Expand Down

0 comments on commit 555f3e0

Please sign in to comment.