
This change adds support for injecting certificates into Docker images during the build process using the same setup as airshipctl. Some proxy servers use custom certificates, and those must be trusted by the container. Signed-off-by: Drew Walters <andrew.walters@att.com> Change-Id: I7d00e416c2e27c2a362b9dc09c1e9e41216b0fe4
19 lines
658 B
Docker
19 lines
658 B
Docker
ARG BASE_IMAGE=gcr.io/google-appengine/python
|
|
FROM ${BASE_IMAGE}
|
|
|
|
# Inject custom root certificate authorities if needed.
|
|
# Docker does not have a good conditional copy statement and requires that a
|
|
# source file exists to complete the copy function without error. Therefore, the
|
|
# README.md file will be copied to the image every time even if there are no
|
|
# .crt files.
|
|
COPY ./certs/* /usr/local/share/ca-certificates/
|
|
RUN update-ca-certificates
|
|
|
|
RUN apt-get update
|
|
RUN apt-get install -y --no-install-recommends jq
|
|
|
|
RUN pip3 config set global.cert /etc/ssl/certs/ca-certificates.crt
|
|
RUN pip3 install requests python-dateutil redfishtool
|
|
|
|
CMD ["/bin/bash"]
|