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

Add named volumes

Abierto
#1,564 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
68/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
docker, typescript
Área
devtools, testing

Línea de trabajo

Read packages/testcontainers/src/generic-container/generic-container.ts, then inspect how Network is created, labelled, and disposed, along with the Docker runtime clients under packages/testcontainers/src/container-runtime/clients/. Add the new volume implementation under packages/testcontainers/src/volume/ and builder mount API; check that Ryuk removes session labelled volumes. Done means named volumes can be mounted and disposed with the session lifecycle.

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

Descripción

enhancement minor

What happens

Containers can mount host paths (withBindMounts) and tmpfs (withTmpFs). There is no API for named volumes.

  • Sharing data between containers, or keeping data across a container being replaced, needs a host directory.
  • Bind mounts depend on the host filesystem being visible to the Docker daemon, which is not the case for a remote daemon and for some CI setups.
  • withBindMounts([{ source: "my-volume", target: "/data" }]) does create a named volume, because Docker treats a source that is not a path as a volume name. That is undocumented here, and the volume gets no Testcontainers labels, so nothing removes it. stop({ removeVolumes: true }) only removes anonymous volumes.

Expected

  • A Volume with the same lifecycle as Network: created on demand, labelled with the session so it is cleaned up, disposable with await using.
  • withVolumeMounts([{ volume, target, readOnly }]) on the builder.

Where

  • packages/testcontainers/src/generic-container/generic-container.ts
  • a new packages/testcontainers/src/volume/
  • packages/testcontainers/src/container-runtime/clients/

Notes

  • Go has VolumeMount(volumeName, target) next to BindMount, applied with WithMounts.
  • Check that Ryuk removes labelled volumes for the session, as it does containers and networks.

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.