Connecting to External Services

LEVEL 0

The Problem

Your containers don’t exist in isolation. They need to connect to the outside world:

  • External APIs: Stripe for payments, Twilio for SMS, AWS services
  • Cloud databases: RDS, MongoDB Atlas, Firebase
  • Third-party services: CDNs, monitoring services, analytics
  • The general internet: Downloading packages, fetching data

A container running in a private Docker network (172.17.x.x) can’t be directly routed on the public internet. So how does a container with a private IP make HTTPS requests to Google? How does it connect to an external database?