Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Say why no container runtime was found

Aperta
#1,571 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
62/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
docker, node.js, typescript
Ambito
devtools

Direzione di ricerca

Start with getContainerRuntimeClient in packages/testcontainers/src/container-runtime/clients/client.ts, then read the strategies under packages/testcontainers/src/container-runtime/ to see how each reports failure. Coordinate with #1532 on the error class and cause handling. Done when the final error lists each attempted strategy and its reason, preserves underlying errors in cause, and links the supported runtimes page.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement minor

What happens

When no container runtime can be reached, the error is one line:

Could not find a working container runtime strategy

getContainerRuntimeClient tries five strategies in turn. The reason each one failed is logged at debug level and then discarded. The person who hits this, usually on first use or in a new CI environment, has to rerun with DEBUG=testcontainers* to learn whether the socket was missing, permission was denied or DOCKER_HOST pointed somewhere unreachable. Seven issues in this repo quote the message.

Expected

The error says what was tried and why each attempt failed, and points to the supported runtimes page:

Could not find a working container runtime. Tried:
- TestcontainersHostStrategy: tc.host is not set
- ConfigurationStrategy: DOCKER_HOST is not set
- UnixSocketStrategy: connect ENOENT /var/run/docker.sock
- RootlessUnixSocketStrategy: no socket at /run/user/1000/docker.sock
- NpipeSocketStrategy: not Windows
See https://node.testcontainers.org/supported-container-runtimes/

Where

getContainerRuntimeClient in packages/testcontainers/src/container-runtime/clients/client.ts, and the strategies in packages/testcontainers/src/container-runtime/strategies/.

Notes

  • Strategies currently signal "not applicable" by returning nothing, so each needs to return a reason.
  • The underlying errors belong in cause.

Dependencies

  • Nothing blocks this. It can start now.
  • Coordinate with #1532: for the error class and cause.
Lingua principale
TypeScript
Stelle
2.6k
Fork
274
Merge medio
1g 14h
PR unite (30g)
44

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di testcontainers/testcontainers-node

Tutte le issue di testcontainers/testcontainers-node

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.