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

Support SSH agent forwarding for container image builds (`--ssh`)

Aperta
#294 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
45/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
docker, go
Ambito
devops

Direzione di ricerca

Start with internal/containers/image_build.go, where the shared image-build logic lives, and internal/containers/image_orchestrator.go for the build-context model. Then find the public API build-options models and their controller mappings, and trace how build secrets are passed to the runtime's build command so SSH forwarding can follow the same path. Done means a build request with SSH enabled produces the equivalent of --ssh default in the runtime command, with tests covering the mapping.

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

Descrizione

Problem

Container image builds that fetch dependencies from private Git repositories may require SSH agent forwarding. Docker and Podman support this through the --ssh build flag:

docker build --ssh default .

The Dockerfile can then use an SSH mount without copying private keys into the image:

RUN --mount=type=ssh,id=default uv sync --locked --no-dev

DCP’s container build configuration currently exposes build arguments and build secrets, but not SSH forwarding. Consequently, builds initiated through clients such as Aspire fail with Permission denied (publickey), even when the equivalent manual build succeeds.

The current workaround is to build manually with --ssh default first, allowing subsequent DCP builds to reuse the cached dependency layer. This breaks whenever that layer’s cache is invalidated.

Requested support

Expose optional SSH forwarding configuration in DCP’s container image build API and propagate it to the container runtime’s build command.

At minimum, support the equivalent of --ssh default, using the caller’s existing SSH agent. Named SSH mounts and explicit agent socket paths would also be useful where supported by the runtime.

Implementation pointers

Relevant areas include the [container build-context model](https://github.com/microsoft/dcp/blob/main/internal/containers/image_orchestrator.go) and [shared image-build implementation](https://github.com/microsoft/dcp/blob/main/internal/containers/image_build.go), together with the public API models and controller mappings.

Related issue

[microsoft/aspire#10510](https://github.com/microsoft/aspire/issues/10510) requests corresponding AppHost support. Adding the DCP capability would enable Aspire to expose SSH forwarding for local container builds.

Lingua principale
Go
Stelle
191
Fork
27
Merge medio
1g 8h
PR unite (30g)
20

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 microsoft/dcp

Tutte le issue di microsoft/dcp

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.