Complete the code to create a new Docker network named 'isolated_net'.
docker network create [1]The command docker network create isolated_net creates a new isolated network named 'isolated_net'.
Complete the command to run a container named 'webapp' connected to the 'isolated_net' network.
docker run -d --name webapp --network [1] nginxThe --network isolated_net option connects the container to the isolated network.
Fix the error in the command to disconnect a container named 'db' from the 'isolated_net' network.
docker network [1] isolated_net dbThe correct command to disconnect a container from a network is docker network disconnect.
Fill both blanks to create a Docker Compose service named 'api' that uses the 'isolated_net' network and exposes port 5000.
services:
api:
image: myapi
ports:
- "[1]:5000"
networks:
- [2]
networks:
isolated_net:
driver: bridgePort mapping uses the host port 5000 to map to container port 5000. The network name is 'isolated_net' to ensure isolation.
Fill all three blanks to define a Docker Compose file with two services 'frontend' and 'backend' isolated on 'isolated_net' network, where 'frontend' depends on 'backend'.
services:
frontend:
image: myfrontend
depends_on:
- [1]
networks:
- [2]
backend:
image: mybackend
networks:
- [3]
networks:
isolated_net:
driver: bridge'frontend' depends on 'backend', and both services use the 'isolated_net' network for isolation.