Urgent.News

What's breaking now, across thousands of outlets.

Tech

Docker - networks and volumes in practice

1. Retomando: de imagens bem construídas a containers que conversam entre si Os artigos anteriores desta série cobriram como criar imagens eficientes e rodar containers isolados. Mas uma aplicação real raramente é um único container: normalmente há uma API, um banco de dados, um cache, talvez uma fila de mensagens — cada um em seu próprio container, precisando se comunicar. E containers, por…

Translated from Portuguese Read in Portuguese

The article discusses how to enable communication between containers and persist data beyond the life of a container. By default, containers are isolated from each other and the host, and any data written to a container is lost when it is removed. To solve this, Docker provides user-defined networks and volumes. A user-defined network allows containers to communicate with each other, while a volume persists data outside the life cycle of a container.

The article explains how to create and manage networks and volumes, and how to use them to run a complete scenario with an API and a Postgres database communicating with each other and persisting data. Docker offers different network drivers, including bridge, host, none, and overlay, and two types of volumes: named volumes and bind mounts.

Written by urgent.news from Dev.to's report — not a translation of it. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Taming Kafka Lag Spikes with KEDA Scale-to-Zero

How we turned always-on Kafka sinks into on-demand workers that shrug off nightly bombardments — by scaling on the right signal, tuning per-pod drain rate, and keeping autoscaling from sabotaging…

  • Use KEDA to scale Kafka sinks based on consumer group lag
  • Increase consumer pod drain rate by processing larger batches
  • Achieve always-on to on-demand shift with zero idle resource usage

More from Saturday 15 August →