We have seen earlier that we can also use the docker-compose build command to just build the images of an application defined in the underlying docker-compose file. But to make this work, we'll have to add the build information to the docker-compose file. In the folder, we have a file, docker-compose.dev.yml, which has those instructions already added. It is basically a copy of the docker-compose.yml file we have used so far:
version: "2.4"
services:
web:
build: web
image: fundamentalsofdocker/ch11-web:2.0
ports:
- 80:3000
db:
build: db
image: fundamentalsofdocker/ch1-db:2.0
volumes:
- pets-data:/var/lib/postgresql/data
volumes:
pets-data:
Please note the build key for each service. The value of that key indicates the context or...