Kind of putting Docker to one side.... what you are really writing is an installation script for Moodle. That's a personal thing. If you asked 10 administrators then you'd get 10 different answers.
I'm not a Docker user but isn't the point to create an easily reproducible custom environment?
So... if it works for you, then great.
I'm not a Docker user but isn't the point to create an easily reproducible custom environment?
So... if it works for you, then great.