Skip to Content
DocsDockerData & NetworkingIntroduction

Data & Networking

Every container has its own storage. When you remove a container, that storage is deleted too — along with anything you created or changed inside it. This section shows how to keep data safe, how to let containers talk to each other, and how to pass in settings that change per environment.

What You Will Learn

By the end of this section, you will be able to:

  • Keep data alive even after a container is removed, using volumes and bind mounts
  • Run a live-reloading Next.js dev environment inside a container
  • Let two containers find and talk to each other by name
  • Pass configuration into a container without rebuilding the image
  • Avoid a common Next.js-specific mistake with environment variables and Docker builds

Pages in This Section

Volumes & Bind Mounts

Keep data alive across container restarts and removals, and run a live-reloading dev setup.

Container Networking

Let containers find each other by name, instead of by hardcoded IP address.

Environment Variables

Pass configuration into a container at runtime — and the one Next.js gotcha that catches almost everyone.

Next → Volumes & Bind Mounts

docker volumes bind mounts, docker networking, docker environment variables, docker nextjs env

Last updated on