Skip to content

Commit

Permalink
Merge pull request #1384 from garberg/docker_certs
Browse files Browse the repository at this point in the history
Fix handling of CA certificates in Dockerfile
  • Loading branch information
garberg authored May 26, 2024
2 parents 55f5fcf + 5587698 commit 893f0bc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile.nipapd
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,14 @@ RUN apt-get update -qy && apt-get upgrade -qy \
&& apt-get clean

# Install any additional CA certs from ca_certs folder required by corp proxies etc
COPY ca_certs/ /
RUN mkdir /ca_certs
COPY ca_certs/ /ca_certs/
RUN mkdir -p /usr/local/share/ca-certificates \
&& cp /ca_certs/*.crt /usr/local/share/ca-certificates/ || true \
&& rm -rf /ca_certs \
&& update-ca-certificates
RUN pip3 config set global.cert /etc/ssl/certs/ca-certificates.crt
ENV REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt


COPY nipap /nipap
Expand Down
10 changes: 10 additions & 0 deletions Dockerfile.www
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ RUN apt-get update -qy && apt-get upgrade -qy \
&& pip3 --no-input install --no-cache-dir envtpl==0.7.2 \
&& apt-get clean

# Install any additional CA certs from ca_certs folder required by corp proxies etc
RUN mkdir /ca_certs
COPY ca_certs/ /ca_certs/
RUN mkdir -p /usr/local/share/ca-certificates \
&& cp /ca_certs/*.crt /usr/local/share/ca-certificates/ || true \
&& rm -rf /ca_certs \
&& update-ca-certificates
RUN pip3 config set global.cert /etc/ssl/certs/ca-certificates.crt
ENV REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt

# Install pynipap, nipap and nipap-www
COPY pynipap /pynipap
COPY nipap /nipap
Expand Down

0 comments on commit 893f0bc

Please sign in to comment.