Chapter 3
- Correct answer: (B) False. The default bridge assigned by Docker has limitations. It is considered a best practice to create a custom bridge network if you plan to run multiple containers on your host.
- Correct answer: (C)
192.168.100.10:80
. A socket is a combination of an IP address and a port.192.168.100.10:80
is a socket for a server running a service on port80
with an IP address of192.168.100.10
. - Correct answer: (C)
docker run -p 8081:8080 -d nginx-web bitnami/nginx
. Since the host has already bound port8080
to another service, we cannot start the new container using8080:8080
. Since each Docker container has its own IP address, we can still use port8080
for the container, but the incoming host port assignment must use an unused port. The only correct answer is C, since it binds the host's port,8081
, to the container port running on port8080
. - Correct answer: (D)
docker run --network=none -it badimage bash
. If you start a container without...