From 6b7363bd38051aa5e3fc37f71cd3e967b9cb064c Mon Sep 17 00:00:00 2001 From: Jarno Smit <51162363+jarnos97@users.noreply.github.com> Date: Wed, 5 Jul 2023 11:00:19 +0200 Subject: [PATCH] Updated Dockerfile.devcontainer: decreased python version to be compatible with Spark cluster and installed Java 11. --- Dockerfile.devcontainer | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/Dockerfile.devcontainer b/Dockerfile.devcontainer index b3b5e23..ad39b59 100644 --- a/Dockerfile.devcontainer +++ b/Dockerfile.devcontainer @@ -1,26 +1,23 @@ -FROM python:3.10 +# Python 3.7 as base +FROM python:3.7-buster -# Install Java -RUN apt update && \ - apt install -y sudo && \ - sudo apt install default-jdk -y +RUN mkdir -p /usr/share/man/man1 /usr/share/man/man2 + +# Install Java 11 +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + openjdk-11-jre # Add non-root user ARG USERNAME=nonroot RUN groupadd --gid 1000 $USERNAME && \ useradd --uid 1000 --gid 1000 -m $USERNAME + ## Make sure to reflect new user in PATH ENV PATH="/home/${USERNAME}/.local/bin:${PATH}" USER $USERNAME -## Pip dependencies -# Upgrade pip -RUN pip install --upgrade pip # Install production dependencies -COPY --chown=nonroot:1000 requirements.txt /tmp/requirements.txt -RUN pip install -r /tmp/requirements.txt && \ - rm /tmp/requirements.txt -# Install development dependencies -# COPY --chown=nonroot:1000 requirements-dev.txt /tmp/requirements-dev.txt -# RUN pip install -r /tmp/requirements-dev.txt && \ -# rm /tmp/requirements-dev.txt \ No newline at end of file +COPY --chown=nonroot:1000 requirements_local.txt /tmp/requirements_local.txt +RUN pip install -r /tmp/requirements_local.txt && \ + rm /tmp/requirements_local.txt