I want to redistribute an image containing MySQL and Apache httpd. However, MySQL is GPL-2.0 licensed and Apache httpd is Apache-2.0 licensed. The two licenses are known to be incompatible. Do I have to keep license compatibility as well when redistributing the Docker Image on DockerHub?
Docker images are simply portable archives containing the files of an operating system, including configuration files, application binaries, etc.
Per the GPL FAQ,
...if the two programs are combined so that they become effectively two parts of one program, then you can't treat them as two separate programs. So the GPL has to cover the whole thing...If the two programs remain well separated, like the compiler and the kernel, or like an editor and a shell, then you can treat them as two separate programs...
Installing two programs incompatible licenses on a system does not violate the license.
Now the licenses of the Dockerfiles themselves is another matter entirely. A Dockerfile is a source file, and therefore is licensed under the terms of the author.