Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1826183: Generate trust bundle for builds #158

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Empty file removed .dockerignore
Empty file.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ RUN INSTALL_PKGS=" \
yum install -y --setopt=skip_missing_names_on_install=False $INSTALL_PKGS && \
yum clean all
COPY --from=builder /go/src/github.com/openshift/builder/openshift-builder /usr/bin/
COPY imagecontent/policy.json /etc/containers/
COPY imagecontent/registries.conf /etc/containers/
COPY imagecontent/storage.conf /etc/containers/
COPY imagecontent/bin /usr/bin
COPY imagecontent/etc/containers /etc/containers
RUN mkdir -p /var/cache/blobs \
/var/lib/shared/overlay-images \
/var/lib/shared/overlay-layers && \
Expand All @@ -29,3 +28,4 @@ RUN ln -s /usr/bin/openshift-builder /usr/bin/openshift-sti-build && \
LABEL io.k8s.display-name="OpenShift Builder" \
io.k8s.description="This is a component of OpenShift and is responsible for executing image builds." \
io.openshift.tags="openshift,builder"
ENTRYPOINT [ "/usr/bin/entrypoint.sh" ]
7 changes: 3 additions & 4 deletions Dockerfile-dev
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ RUN INSTALL_PKGS=" \
" && \
yum install -y --setopt=skip_missing_names_on_install=False ${INSTALL_PKGS} && \
yum clean all

COPY imagecontent/policy.json /etc/containers/
COPY imagecontent/registries.conf /etc/containers/
COPY imagecontent/storage.conf /etc/containers/
COPY imagecontent/bin /usr/bin
COPY imagecontent/etc/containers /etc/containers
RUN mkdir -p /var/cache/blobs \
/var/lib/shared/overlay-images \
/var/lib/shared/overlay-layers && \
Expand All @@ -26,3 +24,4 @@ RUN ln -s /usr/bin/openshift-builder /usr/bin/openshift-sti-build && \
ln -s /usr/bin/openshift-builder /usr/bin/openshift-git-clone && \
ln -s /usr/bin/openshift-builder /usr/bin/openshift-manage-dockerfile && \
ln -s /usr/bin/openshift-builder /usr/bin/openshift-extract-image-content
ENTRYPOINT [ "/usr/bin/entrypoint.sh" ]
6 changes: 3 additions & 3 deletions Dockerfile.rhel7
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ RUN INSTALL_PKGS=" \
yum install -y --setopt=skip_missing_names_on_install=False $INSTALL_PKGS && \
yum clean all
COPY --from=builder /go/src/github.com/openshift/builder/openshift-builder /usr/bin/
COPY imagecontent/policy.json /etc/containers/
COPY imagecontent/registries.conf /etc/containers/
COPY imagecontent/storage.conf /etc/containers/
COPY imagecontent/bin /usr/bin
COPY imagecontent/etc/containers /etc/containers
RUN mkdir -p /var/cache/blobs \
/var/lib/shared/overlay-images \
/var/lib/shared/overlay-layers && \
Expand All @@ -29,3 +28,4 @@ RUN ln -s /usr/bin/openshift-builder /usr/bin/openshift-sti-build && \
LABEL io.k8s.display-name="OpenShift Builder" \
io.k8s.description="This is a component of OpenShift and is responsible for executing image builds." \
io.openshift.tags="openshift,builder"
ENTRYPOINT [ "/usr/bin/entrypoint.sh" ]
11 changes: 11 additions & 0 deletions imagecontent/bin/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

clusterCA="/var/run/configs/openshift.io/pki/tls-ca-bundle.pem"

if [ -e "$clusterCA" ]; then
echo "Adding cluster TLS certificate authority to trust store"
cp -f "$clusterCA" /etc/pki/ca-trust/source/anchors/cluster-ca-bundle.pem
update-ca-trust extract
fi

exec "$@"
2 changes: 2 additions & 0 deletions imagecontent/etc/containers/mounts.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/run/secrets:/run/secrets
/etc/pki/ca-trust:/etc/pki/ca-trust
File renamed without changes.
File renamed without changes.