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
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src

# Install EF Core tools globally in the build stage where SDK is available
RUN dotnet tool install --global dotnet-ef

# Copy Directory.Packages.props first for central package management
COPY ["Directory.Packages.props", "./"]
COPY ["Directory.Build.props", "./"]

# Copy project files
COPY ["src/Melodee.Blazor/Melodee.Blazor.csproj", "src/Melodee.Blazor/"]
Expand Down Expand Up @@ -52,6 +50,7 @@ RUN chmod +x /entrypoint.sh
COPY --from=build /src/src/Melodee.Common/ /app/src/Melodee.Common/
COPY --from=build /src/src/Melodee.Blazor/ /app/src/Melodee.Blazor/
COPY --from=build /src/Directory.Packages.props /app/
COPY --from=build /src/Directory.Build.props /app/

# Create a non-root user and switch to it
RUN groupadd -r melodee && useradd -r -g melodee -m melodee
Expand All @@ -74,8 +73,8 @@ ENV MELODEE_PLAYLISTS_PATH="/app/playlists"

USER melodee

# Install EF Core tools globally for the melodee user
RUN dotnet tool install --global dotnet-ef
# Install EF Core tools globally for the melodee user with specific version matching EF Core 10.0.1
RUN dotnet tool install --global dotnet-ef --version 10.0.1

# Add tools to PATH
ENV PATH="$PATH:/home/melodee/.dotnet/tools"
Expand Down
6 changes: 0 additions & 6 deletions src/Melodee.Blazor/Melodee.Blazor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@
<PackageReference Include="Blazored.SessionStorage" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" />
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot Is this going to break the build? Ensure all projects in solution build. Do a "dotnet clean" then "dotne build". Ensure all unit tests pass.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Verified - the changes do not break the build. All validation complete:

dotnet clean - successful
dotnet build - 0 warnings, 0 errors (all 6 projects built successfully)
dotnet test - 3016 passed, 1 skipped, 0 failed
dotnet restore - 0 warnings (NU1510 warnings eliminated)

The removed package references are indeed redundant - they're already provided by the ASP.NET Core 10 shared framework and are properly resolved transitively.

<PackageReference Include="Microsoft.Extensions.Configuration.Json" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
<PackageReference Include="Microsoft.Extensions.Localization" />
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" />
<PackageReference Include="Quartz.AspNetCore" />
<PackageReference Include="Quartz.Jobs" />
Expand Down