Skip to content

Commit

Permalink
fix: copy cert in dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Nianyu Shen <[email protected]>
  • Loading branch information
nianyush committed Nov 19, 2024
1 parent 7f631d7 commit e8ef750
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@ ARG HTTP_PROXY
ARG HTTPS_PROXY
ARG NO_PROXY

WORKDIR /certs
RUN mkdir -p /certs
COPY certs/ /certs/
RUN ls -al /certs/.
RUN if [ "${OS_DISTRIBUTION}" = "ubuntu" ]; then \
cp -f /certs/* /usr/local/share/ca-certificates/ && \
cp -a /certs/. /usr/local/share/ca-certificates/ && \
update-ca-certificates; \
fi
RUN if [ "${OS_DISTRIBUTION}" = "opensuse-leap" ]; then \
cp -f /certs/* /usr/share/pki/trust/anchors/ && \
cp -a /certs/. /usr/share/pki/trust/anchors/ && \
update-ca-certificates; \
fi

RUN if [ "${OS_DISTRIBUTION}" = "rhel" ]; then \
cp -f /certs/* /etc/pki/ca-trust/source/anchors/ && \
cp -a /certs/. /etc/pki/ca-trust/source/anchors/ && \
update-ca-trust; \
fi
RUN rm -rf /certs
Expand Down

0 comments on commit e8ef750

Please sign in to comment.