Complete the code to specify the build context for the service.
services:
web:
build: [1]The build key should point to the directory with the Dockerfile, which is the build context. Here, ./app is correct.
Complete the code to specify the Dockerfile name in the build section.
services:
api:
build:
context: ./api
dockerfile: [1]The dockerfile key specifies the name of the Dockerfile to use. It must be a file name like Dockerfile.api.
Fix the error in the build section to correctly specify the build context and Dockerfile.
services:
worker:
build: [1]When specifying multiple build options, use a map with context and dockerfile keys inside build.
Fill both blanks to build an image with a custom Dockerfile and tag it.
services:
app:
build:
context: [1]
dockerfile: [2]
image: myapp:latestThe context is the folder path, here ./src. The dockerfile is the custom file name Dockerfile.custom.
Fill all three blanks to build an image with context, Dockerfile, and build args.
services:
backend:
build:
context: [1]
dockerfile: [2]
args:
ENV: [3]The build context is ./backend, the Dockerfile is Dockerfile.prod, and the build argument ENV is set to production.