4 ms·
One thing I cannot live without is the ease at which you can setup network interfaces on Linux. For example, with docker compose I can add this snippet: netw
by xrd 5y ago
One thing I cannot live without is the ease at which you can setup network interfaces on Linux. For example, with docker compose I can add this snippet:
networks:
vpcbr:
driver: bridge
ipam:
config:
- subnet: 10.20.0.0/16
gateway: 10.20.0.1
And, then each service can use something like this:
networks:
vpcbr:
ipv4_address: 10.20.0.6
docker-compose up creates the network, and I can seamlessly access my services by a private IP address VPC. It's so powerful for testing real-world services where you need to have cookies created on the right IP address that is a different one from the auth server, etc.
With OSX I have to use things like 127.0.0.1 and 127.0.0.2, but my docker compose file isn't aware of it, and it is very hacky.
Linux networking supporting is phenomenal and so flexible.