From f4866bfefc4abccb5dc9d3ff6c034e3f00712e9d Mon Sep 17 00:00:00 2001 From: Yuhong Sun Date: Sun, 3 Sep 2023 17:18:41 -0700 Subject: [PATCH] Remove libc-dev and uninstall py (#392) --- backend/Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 93021b0da..8a15781a9 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -10,11 +10,16 @@ COPY ./requirements/default.txt /tmp/requirements.txt RUN pip install --no-cache-dir --upgrade -r /tmp/requirements.txt # Remove py which is pulled in by retry, py is not needed and is a CVE -RUN pip uninstall py +RUN pip uninstall -y py RUN playwright install chromium RUN playwright install-deps chromium +# Cleanup for CVEs and size reduction +RUN apt-get remove -y linux-libc-dev \ + && apt-get autoremove -y \ + && rm -rf /var/lib/apt/lists/* + WORKDIR /app COPY ./danswer /app/danswer COPY ./alembic /app/alembic