Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- pack
- release
- docker

jobs:
docker:
Expand Down
9 changes: 8 additions & 1 deletion src/BootstrapBlazor.Server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@

FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 8080

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
Comment on lines +10 to +11
Copy link
Contributor

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.

Suggested change
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

RUN apt install -y fonts-wqy-microhei

FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /
COPY . .

WORKDIR "src/BootstrapBlazor.Server"
FROM build AS publish
RUN dotnet build
RUN dotnet publish -c Release -o /app
Comment on lines 18 to 21
Copy link
Contributor

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.

Suggested change
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


FROM base AS final
Expand Down
2 changes: 1 addition & 1 deletion src/BootstrapBlazor/BootstrapBlazor.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<Version>9.9.2-beta05</Version>
<Version>9.9.2</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading