Why and how you should dockerize your development environment (with VS Code 💙)

mehdio
6 min readJan 18, 2021

In this blog post, I will cover a few elements that should motivate you to dockerize your development environment and give you a repo example on how you can smoothly achieve this with VS Code. The idea here goes further than just "I have my application dockerized that I can test locally," and creates a complete development experience entirely (or almost?) in docker. I will also share my general experience, and limits I have encountered while having all my development environment dockerized for the past few months.

So… Why?

It uses the same runtime environment as your application

  • A good practice nowadays is to provide a Dockerfile for either the target deployment runtime (e.g K8s, AWS Fargate, GCP Cloud Run, etc…) or local testing. It's relatively easy to extend this existing image for development purposes.
  • Managing multiple versions of multiple frameworks/languages is easier. Even if there are tools to help to solve this (for example python version and pyenv) it's easier if it's just a variable to change in your Dockerfile, and no conflicts guarantee.
  • No more "it works on my machine". It will work on your machine, and everywhere docker is too. (*)

--

--