Hands-on task
Network fact sheet: subnet, gateway and addresses
The network diagram needs a fact sheet for the lab-net network. Write three lines in key=value format to /root/lab-net.txt:
subnet=<lab-net's subnet, address/mask>
gateway=<lab-net's gateway>
beta=<the IPv4 address of the beta container in lab-net>
Then start a container gamma from izzylab/minihttp:1 in the lab-net network with a fixed address: from the lab-net subnet, with 50 as the last octet. The beta container must be able to open http://gamma:8080/.
The lab has its own Docker with no internet access; the images are already loaded: izzylab/minihttp:1, alpine:3.21, busybox:1.36, nginx:1.27-alpine. izzylab/minihttp is a tiny HTTP service on port 8080: GET / answers <NAME> ok, GET /call itself goes to http://<UPSTREAM>/ and answers <NAME> -> <the neighbor's reply> (or 502), GET /env shows its settings. It is configured with the environment variables NAME, PORT, BIND (the address it listens on) and UPSTREAM.
- docker network inspect
- ipam
- docker run --ip