Im trying to create docker image using dockerfile as it uses python, and it was throwing error while installing RUN poetry install --no-root. After digging deep it is throwing SSL certificate problem: unable to get local issuer certificate error as my system has Zscaler installed by my IT team so its failing TLS connection and failing to install.
I tried to export zscaler certificate and added in docker file but that doesn’t seem to work as it was skipping in update-ca-certificates step with this warning - rehash: warning: skipping ZscalerRootCertificate.pem,it does not contain exactly one certificate or CRL.
How to resolve this ? it looks like my ZscalerRootCertificate.crt format is not right for the above error but im not able to see the certificate or how can completely disable this ssl certifcate verification because i just need this docker image to work on my local as i will not be engaging with any code changes. Please help me. Thank you.
dockerfile:
FROM python:3.11.5-slim as base
MAINTAINER Customer Platform <>
ARG GIT_SHA_ARG=unknown
RUN apt-get update && \
apt-get install -y \
curl \
&& rm -rf /var/lib/apt/lists/* \
&& curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin
ENV GIT_SHA=${GIT_SHA_ARG} \
INSTALL_PATH="/app" \
POETRY_HOME="/opt/poetry" \
POETRY_NO_INTERACTION=1 \
POETRY_VERSION=1.6.1 \
VIRTUAL_ENV="/venv" \
SHARED_PATH="/shared"
EXPOSE 8000
RUN mkdir -p $INSTALL_PATH
WORKDIR $INSTALL_PATH
RUN mkdir -p $SHARED_PATH
# Create and activate the venv
RUN mkdir -p ${VIRTUAL_ENV} && \
python -m venv ${VIRTUAL_ENV} && \
${VIRTUAL_ENV}/bin/pip install --upgrade pip
ENV PATH=${VIRTUAL_ENV}/bin:${POETRY_HOME}/bin:${PATH} \
PYTHONPATH=${INSTALL_PATH}
# Install tini
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
# Install poetry (installer uses POETRY_* vars from above)
RUN curl -sSL https://install.python-poetry.org | python
ENTRYPOINT [ "/tini", "--" ]
CMD [ "./bin/bash" ]