FROM ubuntu:22.04
# location in the container
-ENV TA_DIR /home/app/
+ENV TA_DIR=/home/app
-# Install dependencies
-RUN apt-get update && apt-get install -y \
- python3 && apt-get install -y \
- python3-pip
+# Setup JAVA_HOME -- useful for docker commandline
+ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
-# Install OpenJDK-11 for Spark
-RUN apt-get update && \
- apt-get install openjdk-11-jre openjdk-11-jdk -y && \
- apt-get clean;
+WORKDIR ${TA_DIR}
+# Install dependencies
RUN apt-get update && \
- apt-get install scala -y && \
- apt-get clean;
-
-# Setup JAVA_HOME -- useful for docker commandline
-ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64/
-RUN export JAVA_HOME
+ apt-get install -y --no-install-recommends \
+ python3 \
+ python3-pip \
+ python3-dev \
+ build-essential \
+ openjdk-11-jre \
+ openjdk-11-jdk \
+ scala && \
+ apt-get clean && rm -rf /var/lib/apt/lists/*
-WORKDIR ${TA_DIR}
# Copy sources into the container
COPY . .
#Install the pip3 requirements
-RUN pip3 install -r requirements.txt
+RUN pip3 install --no-cache-dir -r requirements.txt
#Expose the ports
EXPOSE 32000