As discussed elsewhere [1] [2], the licenses of Dockerfiles, Docker images, and of the software within those images have to be viewed separately. The most important part is what the licenses of the software in the Docker image are, not what the license of the Dockerfile is.
All of Wordpress, PHP, and Apache are licensed under terms that allow commercial usage. This does not allow you to do anything that you want. In particular, Wordpress themes and plugins must comply with the Wordpress license (GPLv2+). Therefore, any plugins that you distribute (sell, publish, share, …) must be offered under a GPLv2+-compatible license. See also the Wordpress Plugin Guidelines:
1. Plugins must be compatible with the GNU General Public License
Although any GPL-compatible license is acceptable, using the same license as WordPress — “GPLv2 or later” — is strongly recommended. All code, data, and images — anything stored in the plugin directory hosted on WordPress.org — must comply with the GPL or a GPL-Compatible license. Included third-party libraries, code, images, or otherwise, must be compatible. For a specific list of compatible licenses, please read the GPL-Compatible license list on gnu.org.
While you are able to sell your plugin, you cannot restrict customers from sharing the plugin and must effectively make the source code of the plugin freely available. Therefore, most plugin authors do not sell the plugin itself, but support services, guaranteed future updates, or external software (SaaS) with which the plugin interacts.