Skip to content

Commit

Permalink
always ship the egi-trustanchors repo, script to ease CA installation
Browse files Browse the repository at this point in the history
  • Loading branch information
carmelopellegrino committed Jun 28, 2024
1 parent 2cb9b46 commit 038e30d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ RUN yum -y install openldap openldap-clients openssl git which hostname epel-rel
yum clean all && \
rm -rf /var/cache/yum

COPY egi-trustanchors.repo /etc/yum.repos.d/
COPY init-certificates.sh /usr/local/bin/init-certificates.sh

ENV TINI_VERSION v0.18.0
ENV REQUESTS_CA_BUNDLE /etc/pki/tls/cert.pem
Expand Down
6 changes: 6 additions & 0 deletions docker/egi-trustanchors.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[EGI-trustanchors]
name=EGI-trustanchors
baseurl=https://repository.egi.eu/sw/production/cas/1/current/
gpgkey=https://repository.egi.eu/sw/production/cas/1/GPG-KEY-EUGridPMA-RPM-3
gpgcheck=1
enabled=1
16 changes: 16 additions & 0 deletions docker/init-certificates.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

set -e

function install_igtf_ca() {
yum install -y ca-policy-egi-core
cp /etc/grid-security/certificates/*.pem /etc/pki/ca-trust/source/anchors/
update-ca-trust
}

if [ $UID = 0 ]; then
install_igtf_ca
exit $?
fi

sudo $0

0 comments on commit 038e30d

Please sign in to comment.