build command: add support for --build-arg flag
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
- #143 của @OrtegaMatias — đã đóng, không merge
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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. 🍻
- Ngôn ngữ chính
- Swift
- Star
- 1k
- Fork
- 61
- Merge trung bình
- 2 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 17
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Mcrich23/Container-Compose
-
Unknown option '--format'Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Mcrich23/Container-Compose#197 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
SIGINT/SIGTERM ignored during startup phase & healthcheck wait in foreground upCó thể đã có người làm @georgettica đã nhận 27 ngày trước. Đang mở
Mcrich23/Container-Compose#165 · 5 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Mcrich23/Container-Compose#137 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DecodingError.typeMismatch in build argsCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
Mcrich23/Container-Compose#136 · 1 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Containers launch sequentially - can they be launched concurrently?Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Mcrich23/Container-Compose#128 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Mcrich23/Container-Compose
Issue tương tự
-
milestone-3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Harsha0912/recall#71 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
meshtastic/Meshtastic-Apple#3132 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
approved
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
MonitorControl/MonitorControl#1949 ·
-
Bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 91/100