Skip to content

Create basic Docker config for SeederApi#6992

Draft
AmyLGalles wants to merge 3 commits intomainfrom
agalles/add-SeederApi-to-GHCR
Draft

Create basic Docker config for SeederApi#6992
AmyLGalles wants to merge 3 commits intomainfrom
agalles/add-SeederApi-to-GHCR

Conversation

@AmyLGalles
Copy link
Contributor

🎟️ Tracking

📔 Objective

📸 Screenshots

@AmyLGalles AmyLGalles changed the title create basic Docker config for SeederApi Create basic Docker config for SeederApi Feb 12, 2026
@AmyLGalles AmyLGalles added the ai-review Request a Claude code review label Feb 12, 2026
@claude
Copy link
Contributor

claude bot commented Feb 12, 2026

Claude finished @AmyLGalles's task in 2m 34s —— View job


Code Review Summary: Create basic Docker config for SeederApi

PR: #6992 | Author: AmyLGalles | Files Changed: 2 (+47/-0)

Overview

This PR adds the SeederApi utility to the CI build pipeline. The previous review's issues regarding multi-platform build patterns and project paths have been partially addressed, but the fix introduced new issues that will cause the Docker build to fail.


Findings

Severity Finding Location
❌ CRITICAL RID file format incorrect - sourcing will fail util/SeederApi/Dockerfile:16
❌ CRITICAL COPY source path does not exist util/SeederApi/Dockerfile:41
❌ CRITICAL Entrypoint incompatible with self-contained publish util/SeederApi/Dockerfile:44

Summary of Issues

  1. RID variable assignment (line 16): echo $RID writes just the value, but sourcing requires echo "RID=$RID" format
  2. COPY path mismatch (line 41): Build outputs to /source/util/SeederApi/out but COPY references non-existent /app
  3. Entrypoint mismatch (line 44): Self-contained single-file publish produces a native executable, not a DLL runnable via dotnet

Please reference /util/Setup/Dockerfile or /src/Notifications/Dockerfile for the established patterns. These Dockerfiles also demonstrate the entrypoint.sh script pattern used by all services.


Additional Notes

Base image choice: The current Dockerfile uses Ubuntu-based images (sdk:8.0, aspnet:8.0-jammy-chiseled) while all other services use Alpine (sdk:8.0-alpine3.21, aspnet:8.0-alpine3.21). This is a valid alternative but requires the non-musl RID values (linux-x64 vs linux-musl-x64), which are correctly specified.

PR metadata: The Tracking and Objective sections remain empty in the PR description.


🤖 Generated with Claude Code

@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

Logo
Checkmarx One – Scan Summary & Details78f79a41-26cc-4af0-a24c-3ea4c3751233

Great job! No new security vulnerabilities introduced in this pull request

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checkmarx One found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
RID=linux-arm ; \
fi \
&& echo $RID > /tmp/rid.txt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL: RID file format incorrect - sourcing will fail

The file is written as echo $RID > /tmp/rid.txt, which outputs just the value (e.g., linux-x64). When this file is sourced with . /tmp/rid.txt, bash interprets linux-x64 as a command to execute rather than a variable assignment.

Expected pattern (from all other Dockerfiles):

&& echo "RID=$RID" > /tmp/rid.txt

This writes RID=linux-x64 so that sourcing it sets the $RID variable correctly.

###############################################
FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled
WORKDIR /app
COPY --from=build /app .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL: COPY source path does not exist

The build stage publishes to /source/util/SeederApi/out (line 33), but this COPY references /app which was never created.

Fix:

COPY --from=build /source/util/SeederApi/out .

COPY --from=build /app .
EXPOSE 5000
LABEL com.bitwarden.product="bitwarden"
ENTRYPOINT ["dotnet", "SeederApi.dll"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRITICAL: Entrypoint incompatible with self-contained single-file publish

The build uses --self-contained and /p:PublishSingleFile=true, which produces a native executable named SeederApi (not a DLL). The entrypoint ["dotnet", "SeederApi.dll"] will fail because:

  1. No SeederApi.dll exists in the output
  2. Self-contained apps don't require the dotnet command

All other services in this repository use an entrypoint.sh script. The typical pattern:

COPY ./util/SeederApi/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]

The entrypoint script would then execute the native binary:

#!/bin/bash
exec /app/SeederApi "$@"

@sonarqubecloud
Copy link

@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.28%. Comparing base (c15c418) to head (c920b18).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6992      +/-   ##
==========================================
- Coverage   56.28%   56.28%   -0.01%     
==========================================
  Files        1986     1986              
  Lines       87660    87660              
  Branches     7814     7814              
==========================================
- Hits        49339    49338       -1     
- Misses      36490    36491       +1     
  Partials     1831     1831              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant