From 5324999e7b412e8ba2803a0dad6bff36b58f6fd8 Mon Sep 17 00:00:00 2001 From: Vishal Gupta Date: Mon, 9 Dec 2024 10:21:03 +0000 Subject: [PATCH] Add Java to import executor docker image --- import-automation/executor/Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/import-automation/executor/Dockerfile b/import-automation/executor/Dockerfile index 9778c20824..b473cea7fc 100644 --- a/import-automation/executor/Dockerfile +++ b/import-automation/executor/Dockerfile @@ -18,11 +18,18 @@ RUN apt-get update \ && apt-get -y upgrade \ && apt-get -y autoremove \ && rm -rf /var/lib/apt/lists/* + +ENV JAVA_HOME=/usr/local/openjdk-17 +COPY --from=openjdk:17-slim $JAVA_HOME $JAVA_HOME +ENV PATH="${JAVA_HOME}/bin:${PATH}" + WORKDIR /workspace ADD requirements.txt /workspace/requirements.txt RUN pip install -r /workspace/requirements.txt +RUN git clone https://github.com/datacommonsorg/data.git +RUN wget https://github.com/datacommonsorg/import/releases/download/0.1-alpha.1k/datacommons-import-tool-0.1-alpha.1-jar-with-dependencies.jar COPY app/. /workspace/app/ CMD gunicorn --timeout 0 --workers 5 -b :$PORT app.main:FLASK_APP