For several months, I’ve had a Dockerfile which begins like this:
RUN yum update -y && yum install -y https://repo.mysql.com/mysql-community-minimal-release-el7.rpm </font>
&& yum-config-manager --enable mysql57-server-minimal </font>
&& yum install -y mysql-community-libs-compat glibc.i686 </font>
net-tools bind-utils hostname </font>
nmap lsof traceroute epel-release tcpdump iproute </font>
openssh-clients openssh-server </font>
&& yum install -y </font>
It’s been building fine. But earlier this week, I decided to do a --no-cache rebuild from scratch, and I’m suddenly getting this message:
Transaction check error:
file /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql conflicts between attempted installs of mysql-community-minimal-release-el7-1.noarch and mysql80-community-release-el7-3.noarch
So, I went back to basics, went here: https://github.com/mysql/mysql-docker/blob/mysql-server/5.7/Dockerfile and took that Dockerfile in its entirety, and tried building an image. And I got exactly the same error. I am fairly new to Docker, and simply could be doing something very stupid, and there’s an easy fix.
$ docker --version
Docker version 19.03.1, build 74b1e89
On a Centos 7 VM. I don’t know if any other details will be helpful, but will happily supply them.
Through a separate channel, one of the maintainers advised that this was a repo consistency problem, and has now been fixed (as of 31/07/2019).