-
Notifications
You must be signed in to change notification settings - Fork 637
ci: Fix Dockerfile mount secrets #2960
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Dillon Cullinan <[email protected]>
WalkthroughReplaces Docker build-arg–based AWS credentials with BuildKit secrets across Dockerfiles and the build script. Adds secret mounts to relevant RUN steps, updates build.sh to pass secrets instead of build args, and leaves other build logic unchanged. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Dev as Developer
participant Build as build.sh
participant Docker as Docker/BuildKit
participant DF as Dockerfile(.vllm)
participant Steps as RUN Steps
Dev->>Build: Invoke container/build.sh
Build->>Docker: docker build ... --secret id=aws-key-id,env=AWS_ACCESS_KEY_ID/SECRET
Docker->>DF: Parse Dockerfile stages
DF->>Steps: RUN commands with secret mounts
note over Steps: Secrets exposed as env vars only during RUN
Steps-->>Docker: Execute git/uv install requiring AWS creds
Docker-->>Dev: Image built
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. Pre-merge checks (2 passed, 1 warning)❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
🧹 Nitpick comments (4)
container/Dockerfile.vllm (1)
21-25
: Cleanup: remove unused AWS build-args to avoid confusion and accidental leakage pathsIf we’re standardizing on BuildKit secrets, keep credentials out of ARGs entirely.
ARG USE_SCCACHE ARG SCCACHE_BUCKET="" ARG SCCACHE_REGION="" -ARG AWS_ACCESS_KEY_ID="" -ARG AWS_SECRET_ACCESS_KEY=""-ARG AWS_ACCESS_KEY_ID="" -ARG AWS_SECRET_ACCESS_KEY=""Also applies to: 124-126
container/build.sh (1)
370-379
: Optional guard: validate AWS env vars when --use-sccache is setFast-fail with a clear error if required env vars are missing; avoids mysterious S3 auth failures during build.
if [ "$USE_SCCACHE" = true ]; then if [ -z "$SCCACHE_BUCKET" ]; then error "ERROR: --sccache-bucket is required when --use-sccache is specified" fi if [ -z "$SCCACHE_REGION" ]; then error "ERROR: --sccache-region is required when --use-sccache is specified" fi + : "${AWS_ACCESS_KEY_ID:?ERROR: AWS_ACCESS_KEY_ID must be set in the environment when --use-sccache is specified}" + : "${AWS_SECRET_ACCESS_KEY:?ERROR: AWS_SECRET_ACCESS_KEY must be set in the environment when --use-sccache is specified}" + # Optional if using STS: + if [ -n "${AWS_SESSION_TOKEN}" ]; then + echo "Info: Using AWS_SESSION_TOKEN for STS credentials" + fi ficontainer/Dockerfile (2)
59-61
: Cleanup: drop leftover AWS ARGs now that secrets are usedAvoid dangling credential plumbing via build args.
-ARG AWS_ACCESS_KEY_ID -ARG AWS_SECRET_ACCESS_KEY-ARG AWS_ACCESS_KEY_ID -ARG AWS_SECRET_ACCESS_KEYAlso applies to: 277-279
240-241
: Nit: typo in comment (“devr image”)-# Copy NIXL source from devr image +# Copy NIXL source from dev image
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
container/Dockerfile
(3 hunks)container/Dockerfile.vllm
(1 hunks)container/build.sh
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Build and Test - vllm
- GitHub Check: Build and Test - dynamo
Signed-off-by: Dillon Cullinan <[email protected]>
Signed-off-by: Dillon Cullinan <[email protected]>
Signed-off-by: Dillon Cullinan <[email protected]>
Signed-off-by: Dillon Cullinan <[email protected]>
Signed-off-by: Dillon Cullinan <[email protected]> Signed-off-by: hongkuanz <[email protected]>
Overview:
Changes the secrets in dockerfiles to be secret mounts. This is the recommended way of handling secrets in docker build contexts.
Summary by CodeRabbit