posted 6 years ago
I think that Docker images are always running Linux, although that may have changed. However, the base image for a given Docker container may be Red Hat, Ubuntu, Debian, Arch, or one of the distros specifically designed to run in a Docker container such as coreos. Those systems are the same Linux, just pared down since they don't need all the features that a stand-alone machine would use (especially hardware-specific stuff).
A docker image is intended to be capable of running in multiple container instances and to be easily ported from one host to another. That's why their logo is modelled after one of those big container ships.
Docker images are actually layers of overlaid filesystems. When you build a container from a dockerfile, you take a base image and concatenate it to a series of overlays to that base. Each step in the dockerfile creates another image, so if you install a bunch of packages in your image using a single RPM or apt step, they all go in one image layer, but if you then run sed steps to customize their /etc config files, each sed step would be another overlay on top of that. This is very efficient, since common base images can share resources. And an image built by one person can be used as a starting point for another person's dockerfile to enhance or customize things even further. When you export an image, in fact, what you actually get is a TAR where each filesystem overlay layer is a distinct "file" in the TARball.
An image can contain one or more applications. Images themselves are just files (or actually collections of files, as I mentioned above), and only by actually starting a container using an image can you do real work. Containers are essentially miniature VMs. They can communicate with each other using networking (including private internal networks), and when you start a container, if you want external users to be able to talk to it over a network, you can map host OS port numbers to the container's internal ports. For example, a MySQL image might be set up to use port 3305, but if you started 3 instances, you might map one to the host's port 3305, one to host port 3306, and one to host port 3307. Also you can inject external filesystems as mountable volumes in a container. For example, I have a container that runs the bacula backup system. Since container images are read-only, I'd lose all my config information and data files if I had to restart it. Instead I create the mutable files on my host OS and map them into the container's filesystem.
As far as licensing goes, you'd have to contact Oracle. Actually, a lot of us use MariaDB, which is the Open Source MySQL, and doesn't have licensing restrictions for containers above and beyond the standard GNU copyleft-style stuff.
A MySQL image is simply a docker image whose dockerfile included commands to install the MySQL package as part of the process of creating the image file.
Education won't help those who are proudly and willfully ignorant. They'll literally rather die before changing.