webapp. Which command will show you the container's IP address?The docker inspect -f '{{ .NetworkSettings.IPAddress }}' webapp command extracts the IP address of the container named webapp. Other options either inspect networks or show logs, which do not directly provide the IP address.
dbserver is connected to. Which command gives you this information?The command docker inspect -f '{{ json .NetworkSettings.Networks }}' dbserver shows the networks the container is connected to in JSON format. Other commands either list networks or filter containers but do not show the container's network connections.
frontend and backend, are running on the default bridge network. The frontend container cannot ping backend by its container name. What is the most likely reason?By default, Docker's default bridge network does not support automatic DNS resolution between containers by name. To enable this, containers must be connected to a user-defined bridge network. Other options are possible issues but less likely in this scenario.
mynetwork. Which command correctly assigns this IP?To assign a static IP, the network must be created with a subnet range. Option A creates the network with the subnet and then runs the container with the specified IP. Option A fails because the network does not exist with a subnet. Option A creates the network without subnet, so IP assignment fails. Option A does not specify the network.
In Docker Swarm, tasks run on different nodes. To inspect network settings of each container, you must identify the task containers and inspect them on their respective hosts. Option C describes this process. Option C only shows network info but not per-container IPs. Option C is manual and incomplete. Option C does not provide detailed container network info.