Docker – The container solution for applications #MoodleDev

September 17th, 2016

In the recently concluded Moodle General Developer Meeting, Rajesh Taneja shared a presentation on “Docker – Replacement for VM“. The goal of the presentation is to discuss about Using Docker for development/testing environment.

Docker is an open platform for distributed applications for developers and sysadmins which provides better cross-system solution of apps.

Advantages of Using Docker:

The advantages of Docker as stated by Gareth in one of the Moodle forums thread are as follows:

  • Replicating exactly a complex environment without the need to go through a long installation procedure.  Saving you lots of time having to scratch your head over why its not working for you.
  • In the ‘Docker container’ which is essentially a virtual machine – a contained sand boxed machine within a machine – you have the web server, db etc. all installed and configured without messing up the parent operating system.
  • Its only running when you need it and therefore frees up resources / CPU when you’re doing something else.

The best good case scenario for using it would be if you have a heavily customised moodle with a number of settings which need to be set, you can create your image of this and then every time you need to create a new moodle you can create this from the image which will come with all your settings already in place.

Apart from Docker, Vagrant boxes are also revolving around which can be used to create your own local development environment. Check out our previous coverage over Vagrant boxes here.

You can check out the presentation below or download it through this link. I am looking forward for some more detailed steps for using this awesome tool with Moodle and how it can help Moodle developers.

Have you played around with Docker yet? What are the other tools to duplicate the settings from development environment to production environment. You can share your experience with Docker in the comments section below.

  • Ivan Putski

    Docker is not a replacement for VM. This is what developers of both VMware and Docker say.

    1. Docker may be good for Development environment but not for live.
    2. If it’s not good to go live then that means it needs some effort to transfer it to live server out of Docker into live environment (which sounds like more work to me).
    3. VMware and Virtualbox have much better user interface and management tools.
    4. Docker failure theoretically can bring down host system or other containers.
    5. Ever tried to edit files in Docker container ? They have some lame editor you have to use or I guess you have to go back edit the file and then import back into container…pain.
    6. Docker is only as secure as host system, this is not the case with VM. Which means Docker is not secure.
    7. Docker is still not a mature application of vintage technology although it holds promise, and the hope is that we will be able to use it for all kinds of live sites that get hammered on 24x7x365. If it cannot get to that point more quickly I have no use for it.

    • Thanks Ivan for throwing some light over the comparison between VM and Docker. I agree with your concerns but Docker is still evolving and Moodle HQ team have started exploring the platform. Even Microsoft has also joined the party as mentioned by Rajesh in the presentation.