DEV Community

Discussion on: Easy Dockerization with Docker INIT

Collapse
 
jimbozo profile image
James Stokes

The docker-compose approach means you only need to figure it out once. If you're going things like mounting volumes, opening ports, etc your docker run incantation can become complex.

Defining a docker-compose saves you time in the future ensuring all of your requirements are saved in your docker-compose.yml and you only have to run docker-compose up to get your server running.

Collapse
 
scofieldidehen profile image
Scofield Idehen

Nice.

Collapse
 
levelleor profile image
Levelleor

Got you. I was curious to why docker created that compose file instead of just expecting the users to run docker run command. Your reply answered that question.