54

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

39

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 one image or another, it's personal 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).

Sign up to request clarification or add additional context in comments.

4 Comments

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).
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)
Just to note, mysql-server seems to currently be abandoned, it has not received any new updates for 2 years and the latest version is 8.0 so I think the most up-to-date answer would be to use mysql and ignore the other one.
This could be because Oracle use their own container registry now. Found this container-registry.oracle.com/mysql/community-server
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 Comment

Seems ARM support have been added to the official image as well now, so either one works.
2

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.