Skip to content
Merged
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
14 changes: 14 additions & 0 deletions src/app/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Learn about building .NET container images:
# https://github.com/dotnet/dotnet-docker/blob/main/samples/README.md
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build

# Install Node.js for building the React admin SPA
RUN apt-get update && apt-get install -y curl \
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /source

# copy central package management files first
Expand All @@ -17,6 +24,13 @@ COPY ["src/app/app.csproj", "source/app/"]

RUN dotnet restore "source/app/app.csproj"

# copy admin SPA package files and install dependencies first (cache layer)
COPY ["src/admin/package.json", "source/admin/"]
COPY ["src/admin/package-lock.json", "source/admin/"]
WORKDIR /source/source/admin
RUN npm install
WORKDIR /source

COPY ./src .
WORKDIR "/source/app/"
RUN dotnet build "app.csproj" -c Release -o /app/build
Expand Down
Loading