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?
Each layer is an image itself, just one without a human-assigned tag. They have auto-generated IDs though. Each layer stores the changes compared to the image it's based on. An image can consist of a single layer (that's often the case when the squash command was used).
The key difference between a Docker image vs a container is that a Docker image is a template that defines how a container will be realized. A Docker container is a runtime instance of a Docker image. The purpose of this piece is to answer the question, what is a Docker image vs.
In later versions of Docker, it provides the use of multi-stage dockerfiles. Using multi-stage dockerfiles, you can use several base images as well as previous intermediate image layers to build a new image layer.
Docker doesn't do merges of the images, but there isn't anything stopping you combining the dockerfiles if available, and rolling into them into a fat image which you'd need to build.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With