diff --git a/backend/Dockerfile b/backend/Dockerfile index c343b6b68d8ec74c1d4894d6d7a9c8098711cc89..f5e8e90cb82404cca5396dd30ceecfe666f3e751 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,22 +1,20 @@ FROM python:3.11-slim -RUN apt-get update -RUN apt-get install -y gcc libffi-dev - ## make a local directory RUN mkdir /app # set "app" as the working directory from which CMD, RUN, ADD references WORKDIR /app -# copy requirements.txt to /app -ADD requirements.txt . - -# pip install the local requirements.txt -RUN pip install -r requirements.txt +# now copy all the files in this directory to /app +COPY . . -# now copy all the files in this directory to /code -ADD . . +# hadolint ignore=DL3008 +RUN apt-get update \ + && apt-get install --no-install-recommends -y gcc libffi-dev \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* \ + && pip install --no-cache-dir -r requirements.txt # Listen to port 80 at runtime EXPOSE 5000