mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-07-28 05:43:33 +02:00
add ca option (#2774)
This commit is contained in:
@@ -12,6 +12,8 @@ ARG DANSWER_VERSION=0.3-dev
|
|||||||
ENV DANSWER_VERSION=${DANSWER_VERSION} \
|
ENV DANSWER_VERSION=${DANSWER_VERSION} \
|
||||||
DANSWER_RUNNING_IN_DOCKER="true"
|
DANSWER_RUNNING_IN_DOCKER="true"
|
||||||
|
|
||||||
|
ARG CA_CERT_CONTENT=""
|
||||||
|
|
||||||
RUN echo "DANSWER_VERSION: ${DANSWER_VERSION}"
|
RUN echo "DANSWER_VERSION: ${DANSWER_VERSION}"
|
||||||
# Install system dependencies
|
# Install system dependencies
|
||||||
# cmake needed for psycopg (postgres)
|
# cmake needed for psycopg (postgres)
|
||||||
@@ -36,6 +38,17 @@ RUN apt-get update && \
|
|||||||
rm -rf /var/lib/apt/lists/* && \
|
rm -rf /var/lib/apt/lists/* && \
|
||||||
apt-get clean
|
apt-get clean
|
||||||
|
|
||||||
|
|
||||||
|
# Conditionally write the CA certificate and update certificates
|
||||||
|
RUN if [ -n "$CA_CERT_CONTENT" ]; then \
|
||||||
|
echo "Adding custom CA certificate"; \
|
||||||
|
echo "$CA_CERT_CONTENT" > /usr/local/share/ca-certificates/my-ca.crt && \
|
||||||
|
chmod 644 /usr/local/share/ca-certificates/my-ca.crt && \
|
||||||
|
update-ca-certificates; \
|
||||||
|
else \
|
||||||
|
echo "No custom CA certificate provided"; \
|
||||||
|
fi
|
||||||
|
|
||||||
# Install Python dependencies
|
# Install Python dependencies
|
||||||
# Remove py which is pulled in by retry, py is not needed and is a CVE
|
# Remove py which is pulled in by retry, py is not needed and is a CVE
|
||||||
COPY ./requirements/default.txt /tmp/requirements.txt
|
COPY ./requirements/default.txt /tmp/requirements.txt
|
||||||
|
Reference in New Issue
Block a user