Skip to content

Commit

Permalink
feat(docker): Add Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalvishwanathan-beis committed Feb 12, 2024
1 parent 273ad14 commit 4b599bb
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**/bin/
**/obj/
**/out/

Dockerfile*
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build

WORKDIR /app

COPY *.sln .
COPY DVSRegister/*.csproj DVSRegister/
COPY DVSRegister.BusinessLogic/*.csproj DVSRegister.BusinessLogic/
COPY DVSRegister.CommonUtility/*.csproj DVSRegister.CommonUtility/
COPY DVSRegister.Data/*.csproj DVSRegister.Data/

RUN dotnet restore DVSRegister/

COPY . .
RUN dotnet publish -c Release -o out

# final image stage
FROM mcr.microsoft.com/dotnet/aspnet:8.0

WORKDIR /app

COPY --from=build /app/out .
ENTRYPOINT ["dotnet", "DVSRegister.dll"]

0 comments on commit 4b599bb

Please sign in to comment.