Disclosure up front: I run IPYE, a company that leases IP space. This is a practical how-to, and IPYE comes up where it helps, with a short call to action at the end.
Running each scraping job or customer workload in its own container is tidy. Giving each container its own outbound address from your range makes it traceable: abuse reports, blocks and logs map straight to a container. Docker doesn't do this out of the box, because by default all containers masquerade behind the host's primary address. This guide uses one Docker network per egress address, plus SNAT rules, with addresses from a /24 from IPYE . The examples use the documentation prefix 198.51.100.0/24 , with egress addresses 198.51.100.21 to 198.51.100.23 on the host.
Put the egress addresses on the host
for i in 21 22 23 ; do ip addr add 198.51.100.…