-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
24 lines (22 loc) · 825 Bytes
/
Dockerfile
File metadata and controls
24 lines (22 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Stage 1: Build frontend
FROM node:22-alpine AS frontend
WORKDIR /app
COPY src/Clientside/package*.json ./src/Clientside/
WORKDIR /app/src/Clientside
RUN npm ci --legacy-peer-deps
COPY src/Clientside/ ./
RUN npm run build
# Stage 2: Build backend
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS backend
WORKDIR /app
COPY src/ ./src/
COPY --from=frontend /app/src/Agoda.DevExTelemetry.WebApi/wwwroot/ ./src/Agoda.DevExTelemetry.WebApi/wwwroot/
RUN dotnet restore src/Agoda.DevExTelemetry.sln
RUN dotnet publish src/Agoda.DevExTelemetry.WebApi/Agoda.DevExTelemetry.WebApi.csproj \
-c Release -o /publish --no-restore
# Stage 3: Runtime
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS runtime
WORKDIR /app
COPY --from=backend /publish .
EXPOSE 8080
ENTRYPOINT ["dotnet", "Agoda.DevExTelemetry.WebApi.dll"]