This is an automated email from the ASF dual-hosted git repository.

hez pushed a commit to branch release-v0.16
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/release-v0.16 by this push:
     new db2253d4f fix: cherry-pick Dockerfile fixes from issues #4734 and 
#4781 (#4813)
db2253d4f is described below

commit db2253d4f252fe2961f6f53b9d0fda236f92d6b1
Author: Keon Amini <[email protected]>
AuthorDate: Wed Mar 29 16:11:00 2023 -0500

    fix: cherry-pick Dockerfile fixes from issues #4734 and #4781 (#4813)
---
 backend/Dockerfile | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/backend/Dockerfile b/backend/Dockerfile
index a33a2884a..417cc4782 100644
--- a/backend/Dockerfile
+++ b/backend/Dockerfile
@@ -111,12 +111,12 @@ RUN cd /usr/local/deps/target/lib && \
     done
 
 
-FROM debian:bullseye-slim as base
+FROM python:3.11.2-slim-bullseye as base
 
 ENV PYTHONUNBUFFERED=1
 
 RUN apt-get update && \
-    apt-get install -y python3-dev python3-pip tar curl libssh2-1 zlib1g && \
+    apt-get install -y python3-dev python3-pip tar curl libssh2-1 zlib1g 
libffi-dev default-libmysqlclient-dev libpq-dev && \
     apt-get clean && \
     rm -fr /usr/share/doc/* \
            /usr/share/info/* \
@@ -134,13 +134,17 @@ EXPOSE 8080
 
 WORKDIR /app
 # Setup Python
-COPY backend/python/requirements.txt /app/requirements.txt
+COPY python/ /app/python/
 RUN python3 -m pip install --no-cache --upgrade pip setuptools && \
     python3 -m pip install --no-cache dbt-mysql dbt-postgres && \
-    python3 -m pip install --no-cache -r requirements.txt && \
-    rm -fr /usr/share/python-wheels/* \
+    python3 -m pip install --no-cache -r python/requirements.txt && \
+    rm -fr /usr/share/python-wheels/*
+# Setup Python Poetry package manager
 RUN curl -sSL https://install.python-poetry.org | python3 -
 RUN ln -sf /root/.local/bin/poetry /usr/local/bin
+# Build Python plugins
+RUN find /app/python/ -name "*.sh" | xargs -I{} chmod +x {} && \
+    /app/python/build.sh
 
 
 FROM base as devlake-base
@@ -152,14 +156,14 @@ COPY --from=build /usr/local/deps/target/lib/*.so* 
/app/libs
 RUN ldconfig -vn /app/libs
 
 # apps
-COPY --from=build /app/backend/bin /app/bin
-COPY --from=build /app/backend/resources/tap /app/resources/tap
+COPY --from=build /app/bin /app/bin
+COPY --from=build /app/resources/tap /app/resources/tap
 
 ENV PATH="/app/bin:${PATH}"
 
-#add tini, prevent zombie process 
+#add tini, prevent zombie process
 RUN apt-get update && \
-    apt-get install -y tini 
+    apt-get install -y tini
 
 ENTRYPOINT ["/usr/bin/tini", "--"]
 

Reply via email to