Skip to content

Commit

Permalink
dockerfiles: add ability to include private ca chains
Browse files Browse the repository at this point in the history
This adds a two steps that will allow having private CA chains to be copied
into the container and installed in the system CA store.

Signed-off-by: Daniel P. Smith <[email protected]>
  • Loading branch information
dpsmith committed Apr 10, 2024
1 parent 8348e0f commit ff78107
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Dockerfiles/ca-certs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# CA Certificate Chains

Add any PEM formated CA certification chain to this directory with an extension
of '.cert'. If the docker file supports importing CA chains, it will add them
to the container's system CA store.
4 changes: 4 additions & 0 deletions Dockerfiles/generic-oe64
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ RUN apt-get update && \
RUN curl https://storage.googleapis.com/git-repo-downloads/repo > /usr/local/bin/repo && \
chmod a+x /usr/local/bin/repo

# This copy will include README, but update should ignore
ADD ca-certs/* /usr/local/share/ca-certificates/
RUN update-ca-certificates

RUN useradd -Ums /bin/bash -l -p build -u [UID] build && \
usermod -aG sudo build
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
Expand Down
4 changes: 4 additions & 0 deletions Dockerfiles/openxt-bullseye-oe64
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ RUN useradd -Ums /bin/bash -l -p '""' -u $UID $UNAME
ADD files/quiltrc /home/$UNAME/.quiltrc
ADD files/oxt-patch.header /home/$UNAME/oxt-patch.header

# This copy will include README, but update should ignore
ADD ca-certs/* /usr/local/share/ca-certificates/
RUN update-ca-certificates

RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
locale-gen
ENV LANG en_US.utf8
Expand Down
5 changes: 5 additions & 0 deletions Dockerfiles/openxt-buster-oe64
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ ADD files/oxt-patch.header /home/$UNAME/oxt-patch.header
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
locale-gen
ENV LANG en_US.utf8

# This copy will include README, but update should ignore
ADD ca-certs/* /usr/local/share/ca-certificates/
RUN update-ca-certificates

USER $UNAME
WORKDIR /home/$UNAME
ENTRYPOINT ["/bin/bash"]
4 changes: 4 additions & 0 deletions Dockerfiles/openxt-oe64
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ RUN useradd -Ums /bin/bash -l -p '""' -G sudo -u $UID $UNAME
ADD files/quiltrc /home/$UNAME/.quiltrc
ADD files/oxt-patch.header /home/$UNAME/oxt-patch.header

# This copy will include README, but update should ignore
ADD ca-certs/* /usr/local/share/ca-certificates/
RUN update-ca-certificates

RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
locale-gen
ENV LANG en_US.utf8
Expand Down

0 comments on commit ff78107

Please sign in to comment.