Skip to content

Commit

Permalink
Use CentOS-Vault repo
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomini committed Dec 5, 2024
1 parent 7416f6e commit 6e86232
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ COPY assets/vomses /etc/vomses
COPY assets/vomsdir /etc/grid-security/vomsdir/
COPY assets/EGI-trustanchors.repo /etc/yum.repos.d/

RUN bash /tmp/library-scripts/provide-user.sh ${USERNAME} ${USER_UID} ${USER_GID} \
RUN bash /tmp/library-scripts/provide-vault.sh \
&& bash /tmp/library-scripts/provide-user.sh ${USERNAME} ${USER_UID} ${USER_GID} \
&& bash /tmp/library-scripts/provide-deps.sh
10 changes: 10 additions & 0 deletions .devcontainer/library-scripts/provide-vault.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash -e

cat /etc/yum.repos.d/CentOS-Vault.repo \
| sed -n -e '/# C7.8.2003/,$p' \
| sed -e 's/7.8.2003/7.9.2009/g' > CentOS-Vault.repo

mv CentOS-Vault.repo /etc/yum.repos.d/CentOS-Vault.repo

yum-config-manager -y --disable base extras updates
yum-config-manager -y --enable C7.9.2009-base C7.9.2009-extras C7.9.2009-updates
4 changes: 2 additions & 2 deletions .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
type=semver,pattern={{raw}}
type=ref,event=branch
- name: Copy script to docker dir
run: cp vomsimporter.py docker
- name: Copy scripts to docker dir
run: cp vomsimporter.py .devcontainer/library-scripts/provide-vault.sh docker

- name: Build Docker image
uses: docker/build-push-action@v3
Expand Down
8 changes: 6 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
FROM centos:7 as builder

ADD rfc2253 /root/rfc2253
ADD provide-vault.sh /tmp

RUN yum -y install gcc-c++ openssl-devel
RUN bash /tmp/provide-vault.sh && yum -y install gcc-c++ openssl-devel
RUN cd /root/rfc2253 && c++ --version && c++ --std=c++11 -lcrypto -lssl -o dn_converter rfc2253.cpp

FROM centos:7
Expand All @@ -11,12 +12,15 @@ FROM centos:7
ARG TEST_USER=test
ARG TEST_USER_UID=501

ADD provide-vault.sh /tmp

COPY --from=builder /root/rfc2253/dn_converter /usr/local/bin/dn_converter

ENV TEST_USER $TEST_USER
ENV TEST_USER_UID $TEST_USER_UID

RUN curl https://bootstrap.pypa.io/pip/2.7/get-pip.py > get-pip.py && \
RUN bash /tmp/provide-vault.sh && \
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py > get-pip.py && \
python get-pip.py && \
pip install requests && \
yum -y install python-ldap && \
Expand Down

0 comments on commit 6e86232

Please sign in to comment.