diff --git a/Dockerfile b/Dockerfile index 0069e3d..08bd394 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,17 @@ -FROM python:3.11-slim-bullseye +FROM python:3.11-alpine -# Update the package list and install required packages -RUN apt-get update && \ - apt-get install -y git && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* +WORKDIR /app -# Copy the application source code to the container and set the working directory +# Copy the application source code to the container COPY ./requirements.txt /app/requirements.txt - -# copy src COPY ./src /app/src -WORKDIR /app - -# Install Python dependencies -RUN pip3 install --no-cache-dir --upgrade pip && \ - pip3 install --no-cache-dir -r requirements.txt +# Update the package list, install required packages, and install Python dependencies +RUN apk update && \ + apk add --no-cache git && \ + pip install --no-cache-dir --upgrade pip && \ + pip install --no-cache-dir -r requirements.txt && \ + rm -rf /var/cache/apk/* # Set the user to non-root -USER 1000 \ No newline at end of file +USER 1000