Opinionated Docker + VSCode for Magento Commerce Development

Developing for Magento while using Windows can be a bit of a pain. Most people, including many Magento support staffers, will tell you that it’s easiest/best to install a full-blown Linux VM and do all your Magento development there. Personally, I find it’s a waste of resources and degrades your Windows experience unnecessarily since it locks up the resources it’s using.

I think Docker is a better way to go. More than that, the folks at Microsoft have been developing some remarkable features into VS Code lately, including the ability to have some pretty deep integration with Docker containers – in that you can actually attach an instance of VS code onto a container and have a fully realized development experience, from Windows, inside your container.

So I present Magento Commerce Dev, an opinionated Docker and VS Code solution to the age-old developing for Magento on Windows problem. I’ve been using these exact scripts for the better part of 6 months now, daily, and I really enjoy the development experience.

At it’s core, it builds a Linux-based docker container that has all the services you need: NGINX, PHP-FPM, Elasticsearch, Redis, RabbitMQ, MySQL, etc. It stands up an environment configured very much like one of the Magento Cloud environments, so chances are good if it runs locally, it’ll run remotely. It includes persistent volumes for your home directory and /var/log, so that even if you have to rebuild the entire environment, nothing important is lost. It keeps /var/log as a persistent environment in case you have to inspect the log files because something stupid is happening.

Then you attach VS Code to it, and you now have an IDE running on Windows with a Command Line running inside the docker container, and a pretty seamless integration. Please check it out and give me feedback!

Leave a Reply

Your email address will not be published. Required fields are marked *