52

There exists 2 mysql docker images - one that is the "official": https://hub.docker.com/_/mysql/

and one that is "Created, maintained and supported by the MySQL team at Oracle": https://hub.docker.com/r/mysql/mysql-server/

The documentation between both images are almost exactly identical. The expected ENV variables are nearly identical.

Is there any advantage of using one over the other?

0

3 Answers 3

38

The 2 images are not exactly the same the "official" image is based on Debian (see the Dockerfile) and the Oracle's image is based on Oracle Linux (see the Dockerfile). Both are based on community package.

I can't recommend an image or another, it's personnal preference between Debian or RedHat based distribution. The entrypoints are different. If you see a notable difference between them it can be decisive (didn't look deeply but official's entrypoint seems to be more featured).

2
  • 9
    The Oracle one is a fork of the official one with changes to the base image. The entrypoint scripts appear to be identical. My guess is Oracle just wants a way to control their updates and have Oracle through the whole layers (Oracle Linux instead of Debian).
    – Andy Shinn
    Commented Jul 1, 2017 at 3:03
  • 1
    Also, Oracle's version seems to be a smaller image than Debian one, at least for version 5.7.32: mysql 5.7.32 (449MB) vs mysql/mysql-server 5.7.32 (360MB) Commented Dec 2, 2020 at 14:11
8

An additional, and nowadays pretty important difference is that the Oracle based docker images are available in an ARM64/v8 version, next to an AMD64 version. This for example allows you to run the image without virtualization on M1 macs with Apple sillicon.

So if you're running an X86 architecture, choose the one you like. If you're running on ARM, go for the Oracle images for best performance.

1
  • Seems ARM support have been added to the official image as well now, so either one works.
    – Cwista
    Commented Oct 28, 2022 at 3:51
0

A difference I found: the oracle image did not have the mysqlshow command.

This difference was critical to me since I use that command to validate database creation so the website container will not start before the database is ready.

Not the answer you're looking for? Browse other questions tagged or ask your own question.