DEV Community

Discussion on: Easy Dockerization with Docker INIT

Collapse
 
mdledoux profile image
Martin Ledoux • Edited

I have a couple reasons:

Arguably more containers will be added - so this is a trivial example.

But even for such a simple example, any startup params can be saved in that yml file for repeated usage, like volumes, select environment variables (this one container may not need everything in .env), port mappings, etc...
Before I learned Compose, I was writing shell scripts to maintain these values.

Plus, apparently this new Init tool writes the file for you, so why not?