-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (21 loc) · 773 Bytes
/
Copy pathDockerfile
File metadata and controls
29 lines (21 loc) · 773 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
25
26
27
28
29
# Dockerfile
# Stage 1: build and publish
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
COPY Vecctl.slnx ./
COPY src/Vecctl.Domain/Vecctl.Domain.csproj src/Vecctl.Domain/
COPY src/Vecctl.Application/Vecctl.Application.csproj src/Vecctl.Application/
COPY src/Vecctl.Infrastructure/Vecctl.Infrastructure.csproj src/Vecctl.Infrastructure/
COPY src/Vecctl.Cli/Vecctl.Cli.csproj src/Vecctl.Cli/
RUN dotnet restore Vecctl.slnx
COPY . .
RUN dotnet publish src/Vecctl.Cli/Vecctl.Cli.csproj \
--configuration Release \
--no-restore \
--output /app/publish \
-p:UseAppHost=false
# Stage 2: runtime image
FROM mcr.microsoft.com/dotnet/runtime:10.0 AS runtime
WORKDIR /app
COPY --from=build /app/publish .
ENTRYPOINT ["dotnet", "Vecctl.Cli.dll"]