Saltar al contenido
ContenedoresPrincipiante

Fundamentos de Docker para autoalojamiento

Aprende imágenes, contenedores, volúmenes y Docker Compose para desplegar aplicaciones autoalojadas con confianza.

por HomeServersGuide Team1 min de lectura

Docker is the fastest, cleanest way to run self-hosted apps. Once these concepts click, you'll be able to deploy almost anything.

The four concepts you need

  • Image — a read-only template for an app (e.g. jellyfin/jellyfin).
  • Container — a running instance of an image.
  • Volume — persistent storage that survives container updates.
  • Network — how containers talk to each other and the outside world.

Your first container

docker run -d \
  --name pihole \
  -p 53:53/udp -p 80:80 \
  -v /opt/pihole/etc:/etc/pihole \
  --restart unless-stopped \
  pihole/pihole

That single command downloads the image, creates persistent storage, and starts the service.

Docker Compose: the real magic

Typing long docker run commands doesn't scale. Docker Compose lets you describe your whole stack in one file:

services:
  jellyfin:
    image: jellyfin/jellyfin
    container_name: jellyfin
    ports:
      - "8096:8096"
    volumes:
      - ./config:/config
      - /mnt/media:/media
    restart: unless-stopped

Bring it up with one command:

docker compose up -d

Golden rules

  1. Persist data in volumes, never inside the container.
  2. Pin image versions for predictable updates.
  3. Back up your compose files and volumes — they are your entire setup.
  4. Update regularly: docker compose pull && docker compose up -d.

Where to go next

Master Compose and a whole world of self-hosting opens up.

Artículos relacionados

ContenedoresPrincipiante

Cómo instalar Docker en Ubuntu

Un tutorial paso a paso para instalar Docker Engine y Docker Compose en Ubuntu Server y ejecutar tu primer contenedor.

1 min de lectura
Primeros pasosPrincipiante

La guía completa del servidor doméstico para principiantes

De cero a un servidor doméstico en funcionamiento: elige hardware, selecciona un sistema operativo, despliega tus primeras apps y mantén todo seguro y respaldado.

2 min de lectura
RedesPrincipiante

Cómo instalar Pi-hole

Bloquea anuncios y rastreadores en toda tu red instalando Pi-hole en tu servidor doméstico paso a paso.

1 min de lectura