Dev Container — Everyone should know in the Software development world

by Sơn Hoàng
0 comment 82 views

Original Post: https://medium.com/techoverbygst/dev-container-everyone-should-know-in-software-development-world-ce028938ed16

I started working with Docker and Container for almost 7 or 8 years, but I focused 2 last year on architecting on Cloud. Docker was been known with motto Build, Ship, Run, changed the Software development world a lot, especially web-based.

Docker — Build, Ship, and Run

We know that we can run software with docker everywhere, we make the development and production environment more and more closer, but I have thought that: Can we make the development environment between developer and developer closer with Docker, even unify?

I used Docker Compose in almost project, it’s worked well to make a database, messaging (Kafka) unified but except for co-worker’s code, they tend to make the change locally and run it natively with their PC and Workstation, for e.g: run php artisan serve with Laravel or go build && go run with Golang. There are many pain points with many bugs because of so f**king many variables in their environment: Go Version, Php Version, Composer Version.

Visual Studio Code Remote — Containerswill solve this problem. I know about it at random. I am trying to fork WikiJS for internal use wiki in GST and WikiJS teams are using Remote Container.

To run and update code, I have not to install specific required NPM, Database, Vue package, or even Elastic Search. It’s packed with a configured devcontainer.json and simple docker-compose.yml to define the environment and creating process.

devcontainer link with docker-compose.yml, specific service wiki will be chosen as the development environment, postCreateCommand will run right after containers was created in Docker Compose

We just need to install Remote Container extension in VSCode and reopen the current project in container view, Extension and Docker will do the rest.

Wait for create container process finished
Then we have a fully installed dev-environment and ready to make a new code

Happy Coding!

0 comment
2

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

You may also like