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

推荐订阅源

云风的 BLOG
云风的 BLOG
Blog — PlanetScale
Blog — PlanetScale
博客园 - 【当耐特】
博客园_首页
The GitHub Blog
The GitHub Blog
月光博客
月光博客
Hugging Face - Blog
Hugging Face - Blog
有赞技术团队
有赞技术团队
博客园 - 三生石上(FineUI控件)
D
Docker
Stack Overflow Blog
Stack Overflow Blog
WordPress大学
WordPress大学
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Apple Machine Learning Research
Apple Machine Learning Research
Vercel News
Vercel News
酷 壳 – CoolShell
酷 壳 – CoolShell
雷峰网
雷峰网
小众软件
小众软件
I
InfoQ
A
About on SuperTechFans
T
The Blog of Author Tim Ferriss
S
SegmentFault 最新的问题
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - Franky

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 error `Exited (1)` en Ra...
Erick Eduardo Ramos · 2026-06-06 · via DEV Community

Erick Eduardo Ramos

Cómo solucionar docker run con error 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 Raspberry Pi usa arm32v7 o arm64v8.
  • Falta de dependencias del sistema: La imagen espera bibliotecas o drivers no disponibles en el entorno ARM de Raspberry Pi.
  • Problemas de permisos o recursos: Acceso denegado a dispositivos (/dev/gpiomem, /dev/vchiq, etc.) o falta de memoria.
  • Errores de sintaxis en el comando: En tu caso, el espacio en --net = host es crítico — Docker lo interpreta como un nombre de red inválido.

Pasos para solucionarlo

1. Corrige la sintaxis del comando (¡error inmediato!)

# ❌ INCORRECTO (espacios alrededor del '=')
docker run --net = host -d -t myimage

# ✅ CORRECTO (sin espacios)
docker run --net host -d -t myimage

⚠️ Nota crítica: --net = host es interpretado por Docker como --net seguido de un argumento "= host", lo cual crea una red llamada "= host" que no existe. Esto fuerza al contenedor a fallar al inicio.

2. Verifica la arquitectura de la imagen

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

  • Si muestra amd64, no funcionará en Raspberry Pi (a menos que uses QEMU emulación).
  • Para Raspberry Pi 3/4 (ARM 32-bit): necesitas arm32v7.
  • Para Raspberry Pi 4/5 (ARM 64-bit): necesitas arm64v8.

3. Ejecuta en primer plano para ver el error real

docker run --net host -it --rm myimage

  • Elimina -d (background) y añade -it para ver logs en tiempo real.
  • Si el contenedor arranca y luego falla, revisa los logs:
  docker logs <container_id>

4. Verifica permisos y dispositivos

En Raspberry Pi, muchos contenedores requieren acceso a dispositivos del sistema:

# Ejemplo para GPIO (ajustar según necesidad)
docker run --net host --privileged -v /dev:/dev -d myimage

⚠️ --privileged es peligroso en producción. Usa --cap-add o --device para permisos específicos.


Bloque de código corregido (caso típico)

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

# 2. Si es incompatible, reconstruye para ARM
# En Raspberry Pi (ejecutar en el Pi):
docker build --platform linux/arm/v7 -t myimage-arm .

# 3. Ejecuta con sintaxis correcta y permisos necesarios
docker run --net host --rm -it myimage-arm


Pro-tip: Diagnóstico rápido en Raspberry Pi

# Verifica si el contenedor se inicia pero se detiene inmediatamente
docker run --net host -d myimage && sleep 1 && docker ps -a

# Si falla, revisa logs inmediatos:
docker run --net host -it --rm myimage 2>&1 | tee /tmp/container.log

Si el error persiste, compara:

  • Versión de Docker (docker --version)
  • Kernel (uname -a)
  • Sistema operativo (cat /etc/os-release)

🔍 Caso real común: Imágenes construidas con node:alpine (x86) fallan en Raspberry Pi. Usa node:alpine-arm32v7 o arm32v7/node:alpine.