diff --git a/Dockerfile b/Dockerfile index e94d1bab1f..9b6ad7d071 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,9 +4,10 @@ # Base image for GenAIComps based OPEA Python applications # Build: docker build -t opea/comps-base -f Dockerfile . -FROM python:3.11-slim +ARG IMAGE_NAME=python +ARG IMAGE_TAG=3.11-slim -RUN apt-get update +FROM ${IMAGE_NAME}:${IMAGE_TAG} AS base ENV HOME=/home/user @@ -14,9 +15,13 @@ RUN useradd -m -s /bin/bash user && \ mkdir -p $HOME && \ chown -R user $HOME +# get security updates +RUN apt-get update && apt-get upgrade -y && \ + apt-get clean && rm -rf /var/lib/apt/lists/* + WORKDIR $HOME -COPY *.toml *.py *.txt *.md LICENSE . +COPY *.toml *.py *.txt *.md LICENSE ./ RUN pip install --no-cache-dir --upgrade pip setuptools && \ pip install --no-cache-dir -r requirements.txt