abiosoft / abiosoft/colima

Segmentation Fault During vite build in Docker on Colima (Works Outside Docker)

Abierto
#1,305 5 comentarios 3 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Go
Estrellas
30.8k
Forks
613
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### Description

Running vite build inside a Docker container managed by Colima on an Intel Mac results in a segmentation fault. The same build process completes successfully:

1. Outside Docker on the host (Node 20, npm 10)

2. Inside Docker when using Docker Desktop

This suggests a runtime or filesystem-level issue related to Colima’s environment.

Could you please advise if this is a known limitation or if there are any workarounds? I'm happy to provide a full reproducible container configuration and additional trace logs if needed.

### Version

colima version 0.8.1
git commit: 96598cc5b64e5e9e1e64891642b91edc8ac49d16
limactl version 1.0.7
qemu-img version 2.12.0(gradle_1.3.0-beta4-81840-g64886e740b)

### Operating System

- [x] macOS Intel <= 13 (Ventura)
- [ ] macOS Intel >= 14 (Sonoma)
- [ ] Apple Silicon <= 13 (Ventura)
- [ ] Apple Silicon >= 14 (Sonoma)
- [ ] Linux

### Output of `colima status`

INFO[0000] colima is running using macOS Virtualization.Framework
INFO[0000] arch: x86_64
INFO[0000] runtime: docker
INFO[0000] mountType: sshfs
INFO[0000] socket: unix:///Users/*

### Reproduction Steps

1. Clone the repository: https://github.com/tiangolo/full-stack-fastapi-postgresql.git
2. Ensure you are on an Intel Mac, using Colima as your Docker backend.
3. inside the repository, run `docker-compose up frontend`
4. Observe that the build fails with a segmentation fault during the npm run build step, specifically when Vite transforms index.html.

### Expected behaviour

Expected it to be able to build smoothly without segfault error.

### Additional context

Additional Observations:

Running npm ci on the host and copying node_modules into the container still results in a segmentation fault.

Switching to Docker Desktop eliminates the issue entirely.

The segmentation fault consistently occurs during Vite's HTML transformation or dependency graph building.

No explicit use of esbuild in the project.

strace Log:

Attaching the final part of strace showing the crash:

pgsql
Copy
Edit
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x55691c12e000
mprotect(0x55691c120000, 4096, PROT_READ) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x18} ---
+++ killed by SIGSEGV (core dumped) +++

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.