Walking through how to use Docker and Docker compose files in order to maintain the same docker file in Dev and Prod.
The Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image. Using docker build users can create an automated build that executes several command-line instructions in succession.
The Compose file is a YAML file defining services, networks and volumes. A docker-compose.yml file is a YAML file that defines how Docker containers should behave in production.
docker-compose.yml
In the console inside the folder run the follow code
$ docker-compose up --build
In the console inside the folder run the follow code
$ docker-compose up -f docker-compose-prod.yml up --build