Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize docker image #556

Merged
merged 4 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 15 additions & 3 deletions build/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$TARGETPLATFORM falkordb/falkordb-build:latest
FROM --platform=$TARGETPLATFORM falkordb/falkordb-build:latest as builder

ARG TARGETPLATFORM

Expand All @@ -8,13 +8,25 @@ ADD . /FalkorDB

RUN make


FROM redis:7.2.4

dudizimber marked this conversation as resolved.
Show resolved Hide resolved
RUN apt-get update && apt-get install -y libgomp1 && rm -rf /var/lib/apt/lists/*

ARG TARGETPLATFORM

WORKDIR /FalkorDB

COPY --from=builder /FalkorDB/build/docker/run.sh /FalkorDB/build/docker/run.sh
COPY --from=builder /FalkorDB/build/docker/gen-certs.sh /FalkorDB/build/docker/gen-certs.sh

COPY --from=builder /FalkorDB/bin/linux*/src/falkordb.so /FalkorDB/bin/src/falkordb.so

ENV ARCH=${TARGETPLATFORM}

EXPOSE 6379/tcp

ENV FALKORDB_ARGS="MAX_QUEUED_QUERIES 25 TIMEOUT 1000 RESULTSET_SIZE 10000"

RUN echo ${MODULE_DIR}

CMD /FalkorDB/build/docker/run.sh

10 changes: 1 addition & 9 deletions build/docker/run.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
if [ "$ARCH" = "linux/amd64" ]
then
export MODULE_DIR=/FalkorDB/bin/linux-x64-release/src
elif [ "$ARCH" = "linux/arm64" ]
then
export MODULE_DIR=/FalkorDB/bin/linux-arm64v8-release/src
else
echo "Platform not supported"
fi
export MODULE_DIR=/FalkorDB/bin/src

if [ ${TLS} -eq 1 ]
then
Expand Down