Here there is a project to easily run a local Moodle workspace using Docker Compose. It is called docker-compose-moodle It builds several containers for each Moodle main platform components (Apache2, PHP-FPM with XDEBUG and Postgres). The idea is to quickly build and easily manage a local development workspace using Docker Compose.
General developer forum
Worskpace for Moodle using Docker Compose
I've heard about Kubernetes, but have no experience yet. One thing I've been trying to figure out is what to do with shared storage (moodledata) and code syncronization (moodle php code) if you deploy a dockerized Moodle across several hosts (besides NFS).
what proposed here is based on docker compose i.e. to be run on a plain docker host or on a docker in swarm mode; you should also try it by means of OpenShift which is based on docker and kubernetes or just using kompose to properly translate the proposed multi-container deployment into a kubernetes resources manifest:
Beware on the compose file version: now is v3, compared to v2 (and v1) now supported by kompose.
For a production deployment there are at least some missing points here like e.g. named volumes for best shared storage maybe using a different volume driver and the possibility to safely update each container (OS updates, App patches, ...) which is IMHO the key point when moving containers into production since usually the maintenance is done by updating the related container image in the well crafted hierarchy of your production-ready images - probably, using a private registry to best keep your own baseline - and not the running container, as done in a "normal" deployment (last resort for sure).
This means also the ability to manage what is stateful in the production environment e.g. the DB server and almost certainly its high availability.
I'm interested too in a working containerized production environment for Moodle, potentially multi-tenant .
just a quick share about Docker files (w/o compose): keep an eye on https://github.com/CentOS/CentOS-Dockerfiles since it is creating a set of images able to run even within Openshift.
Oddly, today a Moodle image PR has been filed: https://github.com/CentOS/CentOS-Dockerfiles/pull/130.
It's far from being composed - in terms of multiple services for an "advanced" Moodle instance and even in terms of (re)creating different environments for dev/tests purposes - but it's pretty nice for being Openshift ready and for (trying to?) adding Moodle there.