build command: add support for --build-arg flag
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
- #143 di @OrtegaMatias — chiusa senza merge
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 25/100
Direzione di ricerca
The issue identifies the build subcommand and the underlying container build invocation, but gives no source or test file paths. Start by locating the build command’s option parsing and existing build invocation, then check how repeated options are covered in tests. Done means each supplied --build-arg KEY=VALUE reaches every service build; an open linked pull request indicates work is already underway.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
The build subcommand does not currently support the --build-arg flag, which is a standard part of docker compose build. Any project that relies on build-time arguments (e.g. for injecting private registry tokens or license keys into a multi-stage Dockerfile) cannot use container-compose build as a drop-in replacement today.
Current Behavior
Running the following command fails immediately with an unrecognized option error:
container-compose build \
--build-arg BO_NPM_PKG_AUTH_TOKEN=$BO_NPM_PKG_AUTH_TOKEN \
--build-arg FONTAWESOME_PRO_TOKEN=$FONTAWESOME_PRO_TOKEN \
--build-arg SIDEKIQ_KEY=$SIDEKIQ_KEY
Error: Unknown option '--build-arg'
Usage: container-compose <subcommand>
See 'container-compose --help' for more information.
Expected Behavior
Parity with docker compose build, which accepts one or more --build-arg KEY=VALUE pairs and forwards them to the underlying image build process as build-time variables. The equivalent native container build CLI also supports --build-arg, so this should be a straightforward passthrough.
# Should work the same as it does with docker compose
container-compose build \
--build-arg BO_NPM_PKG_AUTH_TOKEN=$BO_NPM_PKG_AUTH_TOKEN \
--build-arg FONTAWESOME_PRO_TOKEN=$FONTAWESOME_PRO_TOKEN \
--build-arg SIDEKIQ_KEY=$SIDEKIQ_KEY
Motivation / Use Case
Build args are essential for projects that need to inject secrets or configuration at image build time without baking them into the image or committing them to source control. Common real-world examples include:
- Private npm registry auth tokens (e.g. GitHub Packages, Artifactory)
- Font Awesome Pro license keys
- Private gem/package credentials (e.g. Sidekiq Pro)
- Any multi-stage Dockerfile that uses ARG to gate access to private dependencies
Without --build-arg support, teams adopting Apple Container via container-compose are blocked from migrating existing Docker-based CI/CD workflows that rely on this flag.
Proposed Implementation
The build command should be updated to:
Accept --build-arg as a repeatable option (i.e. it can be specified multiple times), taking a KEY=VALUE string each time.
For each service being built, pass each provided --build-arg value through to the underlying container build invocation via its own --build-arg flags.
References
docker compose build docs — --build-arg
container build CLI — already supports --build-arg
I appreciate all the work you've done on this project. 🍻
- Lingua principale
- Swift
- Stelle
- 1k
- Fork
- 61
- Merge medio
- 2g 4h
- PR unite (30g)
- 17
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Mcrich23/Container-Compose
-
Unknown option '--format'Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
Mcrich23/Container-Compose#197 ·
I maintainer di solito rispondono entro 1 giorno
-
SIGINT/SIGTERM ignored during startup phase & healthcheck wait in foreground upForse già presa @georgettica l’ha presa 27 giorni fa. Aperta
Mcrich23/Container-Compose#165 · 5 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
Mcrich23/Container-Compose#137 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
DecodingError.typeMismatch in build argsForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
Mcrich23/Container-Compose#136 · 1 commento · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
Containers launch sequentially - can they be launched concurrently?Forse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
Mcrich23/Container-Compose#128 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Mcrich23/Container-Compose
Issue simili
-
milestone-3
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Harsha0912/recall#71 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
meshtastic/Meshtastic-Apple#3132 ·
I maintainer di solito rispondono entro 1 giorno
-
approved
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
MonitorControl/MonitorControl#1949 ·
-
Bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 91/100