Docker Compose: A Mini Orchestration Tool for Local Development
Docker Compose with Bind Mounts
It's common to use bind mounts when developing an application. The developer, on their local machine, will usually have the source code of the application in a working directory, and they mount that directory to the container so that any changes made to the source code on the host using their IDE will be reflected inside the container automatically. This helps the developer keep their development environment and habits while using Docker containers for development. If the image used is the same as the production image, the developer can have more confidence that the application will work in production as it works in their local development environment (it's more complex than that in reality, but this is the general idea).
services:
web:
build: .
ports:Painless Docker - 2nd Edition
A Comprehensive Guide to Mastering Docker and its EcosystemEnroll now to unlock all content and receive all future updates for free.
Hurry! This limited time offer ends in:
To redeem this offer, copy the coupon code below and apply it at checkout:
