Remove libc-dev and uninstall py (#392)

This commit is contained in:
Yuhong Sun 2023-09-03 17:18:41 -07:00 committed by GitHub
parent c28f4d4527
commit f4866bfefc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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