Let's assume you have a running docker container with a webserver that serves requests. You want to see
the requests and responses it receives. You can use the --net container:<id>
of the docker run
command.
First, you have to discover the ID of the container that you want to monitor. Use docker ps
to get it.
# On host
docker ps