-
-
Notifications
You must be signed in to change notification settings - Fork 362
chore(Docker): add pupeteersharp support #6615
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
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR configures the Docker environment and CI workflow to support PuppeteerSharp by installing Chrome and necessary fonts, adjusting ports, adding a build step, updating workflow triggers, and introducing the PuppeteerSharp dependency. Class diagram for PuppeteerSharp dependency additionclassDiagram
class BootstrapBlazor {
}
class PuppeteerSharp {
}
BootstrapBlazor --> PuppeteerSharp : uses
PuppeteerSharp : +Google Chrome dependency
PuppeteerSharp : +Font support
PuppeteerSharp : +Headless browser automation
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6615 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 739 739
Lines 31672 31672
Branches 4458 4458
=========================================
Hits 31672 31672
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Hey @ArgoZhang - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `src/BootstrapBlazor.Server/Dockerfile:10` </location>
<code_context>
+
+RUN apt-get update && apt-get install -y wget
+RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
+RUN apt install -y ./google-chrome-stable_current_amd64.deb
+RUN rm ./google-chrome-stable_current_amd64.deb
+RUN apt install -y fonts-wqy-microhei
</code_context>
<issue_to_address>
Installing Chrome via a downloaded .deb may introduce dependency issues if not handled explicitly.
Add 'apt-get -f install' after installing the .deb to automatically resolve any missing dependencies.
</issue_to_address>
<suggested_fix>
<<<<<<< SEARCH
RUN apt install -y ./google-chrome-stable_current_amd64.deb
RUN rm ./google-chrome-stable_current_amd64.deb
=======
RUN apt install -y ./google-chrome-stable_current_amd64.deb
RUN apt-get -f install -y
RUN rm ./google-chrome-stable_current_amd64.deb
>>>>>>> REPLACE
</suggested_fix>
### Comment 2
<location> `src/BootstrapBlazor.Server/Dockerfile:20` </location>
<code_context>
WORKDIR "src/BootstrapBlazor.Server"
FROM build AS publish
+RUN dotnet build
RUN dotnet publish -c Release -o /app
</code_context>
<issue_to_address>
Running 'dotnet build' before 'dotnet publish' may be redundant.
Consider removing the separate 'dotnet build' step to simplify the process, as 'dotnet publish' already includes a build.
</issue_to_address>
<suggested_fix>
<<<<<<< SEARCH
WORKDIR "src/BootstrapBlazor.Server"
FROM build AS publish
+RUN dotnet build
RUN dotnet publish -c Release -o /app
=======
WORKDIR "src/BootstrapBlazor.Server"
FROM build AS publish
RUN dotnet publish -c Release -o /app
>>>>>>> REPLACE
</suggested_fix>
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
RUN apt install -y ./google-chrome-stable_current_amd64.deb | ||
RUN rm ./google-chrome-stable_current_amd64.deb |
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.
suggestion (bug_risk): Installing Chrome via a downloaded .deb may introduce dependency issues if not handled explicitly.
Add 'apt-get -f install' after installing the .deb to automatically resolve any missing dependencies.
RUN apt install -y ./google-chrome-stable_current_amd64.deb | |
RUN rm ./google-chrome-stable_current_amd64.deb | |
RUN apt install -y ./google-chrome-stable_current_amd64.deb | |
RUN apt-get -f install -y | |
RUN rm ./google-chrome-stable_current_amd64.deb |
WORKDIR "src/BootstrapBlazor.Server" | ||
FROM build AS publish | ||
RUN dotnet build | ||
RUN dotnet publish -c Release -o /app |
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.
suggestion: Running 'dotnet build' before 'dotnet publish' may be redundant.
Consider removing the separate 'dotnet build' step to simplify the process, as 'dotnet publish' already includes a build.
WORKDIR "src/BootstrapBlazor.Server" | |
FROM build AS publish | |
RUN dotnet build | |
RUN dotnet publish -c Release -o /app | |
WORKDIR "src/BootstrapBlazor.Server" | |
FROM build AS publish | |
RUN dotnet publish -c Release -o /app |
Link issues
fixes #6614
Summary By Copilot
Regression?
Risk
Verification
Packaging changes reviewed?
☑️ Self Check before Merge
Summary by Sourcery
Enable PuppeteerSharp support in the Docker setup by installing Google Chrome and required fonts, updating the build process, and adjusting CI triggers
Enhancements:
CI: