Skip to content

Commit e46a04d

Browse files
Fixed missing gpg key for EPEL
1 parent 39baa21 commit e46a04d

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

Dockerfile

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,33 @@
11
FROM docker.io/centos:centos7
2-
32
# Remove the default repo file
43
RUN rm /etc/yum.repos.d/CentOS-Base.repo
5-
64
# Copy repo files
75
COPY CentOS-Vault.repo /etc/yum.repos.d/
86
COPY CentOS-SCLo-scl.repo /etc/yum.repos.d/
97
COPY CentOS-SCLo-rh.repo /etc/yum.repos.d/
108
COPY EPEL-Vault.repo /etc/yum.repos.d/
11-
129
# Import GPG keys
1310
RUN curl -o /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo https://www.centos.org/keys/RPM-GPG-KEY-CentOS-SIG-SCLo
1411
RUN 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
1716
RUN yum clean all && yum makecache
18-
1917
#update
2018
RUN yum update -y
21-
2219
#Fix the repo files again
2320
RUN rm /etc/yum.repos.d/CentOS-Base.repo
24-
2521
# Copy repo files
2622
COPY CentOS-Vault.repo /etc/yum.repos.d/
2723
COPY CentOS-SCLo-scl.repo /etc/yum.repos.d/
2824
COPY CentOS-SCLo-rh.repo /etc/yum.repos.d/
2925
COPY EPEL-Vault.repo /etc/yum.repos.d/
30-
3126
# Import GPG keys
3227
RUN curl -o /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo https://www.centos.org/keys/RPM-GPG-KEY-CentOS-SIG-SCLo
3328
RUN 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
3633
RUN yum clean all && yum makecache

0 commit comments

Comments
 (0)