Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Make stopped containers restartable, or drop the empty stopped types

Abierto
#1,541 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
56/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
docker, node.js, typescript
Área
devtools, testing

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
TypeScript
Estrellas
2.6k
Forks
274
Merge medio
1 d 14 h
PR fusionados (30 d)
44

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de testcontainers/testcontainers-node

Todos los issues de testcontainers/testcontainers-node

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.