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

Make stopped containers restartable, or drop the empty stopped types

Aperta
#1,541 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
56/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
docker, node.js, typescript
Ambito
devtools, testing

Direzione di ricerca

Start with the listed stopped container and Docker Compose environment files, then trace how stop() and down() construct and return these objects. Compare those paths with the expected restart and removal behavior, including wait strategy handling. Done means the stopped states support the requested lifecycle operations or the empty marker types are removed or documented, with tests covering the chosen behavior.

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

Descrizione

enhancement minor

What happens

stop(), down() and Network.stop() return a "stopped" object, but those objects do very little:

Type Members
StoppedTestContainer getId(), copyArchiveFromContainer()
StoppedNetwork none
StoppedDockerComposeEnvironment down()
DownedDockerComposeEnvironment none

After container.stop({ remove: false }) the container still exists, but the returned object cannot start it again or remove it. Doing either means dropping to getContainerRuntimeClient() and Dockerode. The same goes for a Compose environment after stop(): it can be taken down but not brought back up.

Expected

Either the stopped states become useful, or the empty ones go away:

  • StoppedTestContainer gains start() (returning a started container, with wait strategy applied) and remove().
  • StoppedDockerComposeEnvironment gains a way to start again.
  • StoppedNetwork and DownedDockerComposeEnvironment are replaced by Promise<void>, or documented as markers.

Where

  • packages/testcontainers/src/test-container.ts
  • packages/testcontainers/src/generic-container/stopped-generic-container.ts
  • packages/testcontainers/src/network/network.ts
  • packages/testcontainers/src/docker-compose-environment/stopped-docker-compose-environment.ts
  • packages/testcontainers/src/docker-compose-environment/downed-docker-compose-environment.ts

Notes

  • Go's container has Start, Stop and Terminate on one type, so a stopped container can be started again.
  • Adding methods is minor. Removing the empty classes would be major.

Dependencies

  • Nothing blocks this. It can start now.
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.