Docker MySQL 5.7 build problem

For several months, I’ve had a Dockerfile which begins like this:

FROM centos:centos7

ARG MYSQL_SERVER_PACKAGE=mysql-community-server-minimal-5.7.24

ARG MYSQL_SHELL_PACKAGE=mysql-shell-8.0.13

RUN yum update -y && yum install -y </font> </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>


      $MYSQL_SHELL_PACKAGE </font>

      libpwquality </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: 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.

I’m using:

$ 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).

Hello! I am new to docker and I want to have a mysql5.7 container with centos 7 as its base OS. How do you start mysql in your dockerfile? Sorry if this seems to be an easy question.