惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
M
MIT News - Artificial intelligence
D
Docker
S
SegmentFault 最新的问题
B
Blog
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
博客园 - 【当耐特】
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
腾讯CDC
阮一峰的网络日志
阮一峰的网络日志
U
Unit 42
C
Check Point Blog
GbyAI
GbyAI
美团技术团队
Recent Announcements
Recent Announcements
F
Fortinet All Blogs
量子位
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
Visual Studio Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
G
Google Developers Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Cómo solucionar `docker run` con `Exited (1)` en Raspberr...
Erick Eduardo Ramos · 2026-06-27 · via DEV Community

Erick Eduardo Ramos

Cómo solucionar docker run con Exited (1) en Raspberry Pi

¿Por qué ocurre este error?

El código de salida 1 indica que el proceso principal del contenedor terminó con un error genérico. En Raspberry Pi, los casos más comunes son:

  • Arquitectura incompatible: La imagen fue construida para amd64 (x86_64) pero el Raspberry Pi usa arm32v7 o arm64v8.
  • Problemas con el comando inicial: El CMD o ENTRYPOINT de la imagen falla al ejecutarse en el entorno del Pi (por ejemplo, falta una librería específica de ARM, o el binario no es compatible).
  • Espacio en disco insuficiente: Raspberry Pi suele tener sistemas de archivos pequeños (especialmente en tarjetas SD).
  • Uso incorrecto de --net=host: En algunas versiones de Docker en Raspberry Pi, el modo host puede causar fallos si no se configura correctamente.

🔍 Nota crítica: En tu comando docker run --net = host, hay espacios alrededor del =. Esto es un error de sintaxis: Docker interpreta --net como una opción sin valor y =, host como argumentos adicionales → el contenedor falla al iniciar.


Pasos para solucionarlo

1. Corrige la sintaxis del comando

Elimina los espacios alrededor del = en --net=host:

docker run --net=host -d -t myimage

⚠️ Esto es lo más probable que esté causando el fallo inmediato. El error de sintaxis hace que Docker no asigne la red correctamente y el contenedor falle al arrancar.


2. Verifica la arquitectura de la imagen

Ejecuta en tu Raspberry Pi:

docker inspect myimage --format '{{.Architecture}}'

  • Si devuelve amd64, la imagen no es compatible con Raspberry Pi (ARM).
  • Debes reconstruir la imagen para ARM o usar una versión multiarquitectura.

Solución: Construir para ARM en Raspberry Pi

Si tienes el Dockerfile, asegúrate de construirlo en el Pi:

docker build -t myimage .

O usa buildx si construyes desde otra máquina:

docker buildx build --platform linux/arm/v7 -t myimage .


3. Ejecuta en primer plano para diagnosticar

Elimina -d (modo detached) y añade -it para ver el error en tiempo real:

docker run --net=host -it myimage

Esto mostrará el mensaje de error real (ej. exec format error, segmentation fault, command not found, etc.).


4. Verifica espacio en disco

En Raspberry Pi, el espacio en /var/lib/docker suele agotarse:

df -h /var/lib/docker

Si está >90% usado, limpia contenedores y capas no usadas:

docker system prune -a --volumes


5. Verifica versiones de Docker y kernel

Algunas versiones de Docker en Raspberry Pi (especialmente las antiguas de apt) tienen bugs conocidos:

docker --version
uname -r

Recomendación: Usa Docker CE oficial para Raspberry Pi (no el paquete de Debian/Raspbian):

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh


Bloque de código corregido (ejemplo funcional)

# 1. Limpieza previa
docker system prune -af

# 2. Verifica arquitectura
docker inspect myimage --format '{{.Architecture}}'

# 3. Ejecuta en primer plano para debug
docker run --net=host -it myimage

# 4. Si falla, revisa logs
docker logs <container_id>


Pro-Tip: Diagnóstico rápido con strace

Si el contenedor falla silenciosamente, inyecta strace para ver qué syscall falla:

docker run --net=host -it --rm \
  -v /usr/bin/strace:/usr/bin/strace:ro \
  myimage \
  strace -f -o /tmp/strace.log /bin/sh -c "exec your-original-cmd"

Luego revisa /tmp/strace.log para encontrar la última llamada fallida.


Resultado esperado: Tras corregir la sintaxis (--net=host sin espacios) y asegurar arquitectura compatible, el contenedor arrancará sin Exited (1).