File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11FROM docker.io/centos:centos7
2-
32# Remove the default repo file
43RUN rm /etc/yum.repos.d/CentOS-Base.repo
5-
64# Copy repo files
75COPY CentOS-Vault.repo /etc/yum.repos.d/
86COPY CentOS-SCLo-scl.repo /etc/yum.repos.d/
97COPY CentOS-SCLo-rh.repo /etc/yum.repos.d/
108COPY EPEL-Vault.repo /etc/yum.repos.d/
11-
129# Import GPG keys
1310RUN curl -o /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo https://www.centos.org/keys/RPM-GPG-KEY-CentOS-SIG-SCLo
1411RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo
15-
12+ # Add EPEL GPG key
13+ RUN curl -o /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 https://archive.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
14+ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
1615# Clean and make cache
1716RUN yum clean all && yum makecache
18-
1917# update
2018RUN yum update -y
21-
2219# Fix the repo files again
2320RUN rm /etc/yum.repos.d/CentOS-Base.repo
24-
2521# Copy repo files
2622COPY CentOS-Vault.repo /etc/yum.repos.d/
2723COPY CentOS-SCLo-scl.repo /etc/yum.repos.d/
2824COPY CentOS-SCLo-rh.repo /etc/yum.repos.d/
2925COPY EPEL-Vault.repo /etc/yum.repos.d/
30-
3126# Import GPG keys
3227RUN curl -o /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo https://www.centos.org/keys/RPM-GPG-KEY-CentOS-SIG-SCLo
3328RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo
34-
29+ # Add EPEL GPG key again after repo reset
30+ RUN curl -o /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 https://archive.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-7
31+ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
3532# Clean and make cache
3633RUN yum clean all && yum makecache
You can’t perform that action at this time.
0 commit comments