Complete the command to run a Docker container using host networking mode.
docker run --rm -it --network=[1] nginxUsing --network=host makes the container share the host's network stack directly.
Complete the Docker Compose service definition to use host networking mode.
services:
web:
image: nginx
network_mode: [1]Setting network_mode: host in Docker Compose uses the host's network stack.
Fix the error in the Docker run command to enable host networking mode.
docker run --rm -it --network [1] nginxThe correct syntax is --network host without extra characters or symbols.
Fill both blanks to create a Docker command that runs a container with host networking and removes it after exit.
docker run --rm [1] --network=[2] nginx
-it runs the container interactively, and --network=host uses host networking.
Fill all three blanks to define a Docker Compose service that uses host networking, runs detached, and restarts always.
services:
app:
image: nginx
network_mode: [1]
restart: [2]
command: [3]Host networking is 'host', restart policy is 'always', and the command keeps nginx running in foreground.