_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

Docker networking — connecting containers in practice

10. 06. 2015 1 min read CORE SYSTEMSinfrastructure
Docker networking — connecting containers in practice

Containers are isolated. How do you connect a web server to a database? How do you communicate between containers on different servers? Docker networking has undergone a fundamental evolution.

Bridge, Host, Overlay

Bridge: User-defined bridge with DNS discovery. Containers see each other by name. Host: Shared network namespace, no isolation. Overlay: Multi-host via VXLAN; requires a KV store (Consul/etcd).

docker network create myapp-net
docker run -d --name db --network myapp-net postgres:9.4
docker run -d --name app --network myapp-net -e DB_HOST=db myapp:1.0

Security and tips

Separate networks for isolation: a frontend network (web + API gateway), a backend network (API + DB). Do not publish ports you do not need. Consider overlay with encryption.

Networking is key infrastructure

For local development use docker-compose networks; for production use overlay with Consul discovery.

dockernetworkingkontejnerysdn
Share:

CORE SYSTEMS

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.

Need help with implementation?

Our experts can help with design, implementation, and operations. From architecture to production.

Contact us