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

Support network options on `Network`

Aperta
#1,535 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
65/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 packages/testcontainers/src/network/network.ts and read how Network.start() builds the network options and how GenericContainer implements builder methods. Check the existing network tests and run them to understand coverage for names, drivers, IPv6, labels, and IPAM. Done means callers can configure the requested network settings through Network while existing tests still pass.

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

Descrizione

enhancement minor

What happens

new Network() takes no options. Every setting is hardcoded in Network.start():

Driver: "bridge",
Internal: false,
Attachable: false,
Ingress: false,
EnableIPv6: false,
CheckDuplicate: true,

The name is always a random UUID and the labels are fixed. The constructor's only parameter is a Uuid used by tests.

Things that cannot be done today:

  • an internal network, to test behaviour without outbound access
  • IPv6
  • a custom driver, or driver options
  • a fixed subnet (IPAM)
  • a readable name or extra labels

Expected

Builder methods on Network in the same style as GenericContainer, for example withName, withDriver, withInternal, withIpv6, withLabels.

Where

packages/testcontainers/src/network/network.ts.

Notes

  • Java has Network.builder() with driver, enableIpv6 and createNetworkCmdModifier. Go has network.New(ctx, opts...) with WithDriver, WithInternal, WithLabels, WithIPAM and WithAttachable.
  • The constructor's Uuid parameter is in the way of a conventional options argument.

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.