Complete the code to build a Docker image named 'app' from the current directory.
docker build -t app [1] Dockerfile .-d which runs containers detached, not for building images.The -f option specifies the Dockerfile to use. Here, it points to the current directory's Dockerfile.
Complete the command to run a Docker container named 'web' in detached mode.
docker run --name web [1] nginx-it which runs the container interactively.The -d option runs the container in detached mode, meaning it runs in the background.
Fix the error in the command to push the Docker image 'app' to Docker Hub.
docker push [1]/appYou must prefix the image name with your Docker Hub username to push it correctly.
Fill both blanks to create a Dockerfile that uses the 'python:3.12' image and copies 'app.py' into the container.
FROM [1] COPY [2] /app.py
The FROM line sets the base image. The COPY line copies the local app.py file into the container.
Fill all three blanks to define a Docker Compose service named 'web' that builds from the current directory, maps port 5000, and restarts always.
services:
web:
build: [1]
ports:
- "[2]:5000"
restart: [3]The build path is current directory .. The port mapping exposes port 5000. The restart policy always restarts the container if it stops.