chore: setup initial docker development

This commit is contained in:
Stevan Freeborn
2024-04-03 12:02:00 -05:00
parent dd092738aa
commit 6e090f9b4b
15 changed files with 122 additions and 61 deletions
+19
View File
@@ -0,0 +1,19 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS setup-stage
WORKDIR /app
COPY *.csproj ./
RUN dotnet restore
COPY . .
FROM setup-stage as development-stage
RUN apt-get update
RUN apt-get install -y unzip
RUN curl -sSL https://aka.ms/getvsdbgsh | /bin/sh /dev/stdin -v latest -l ~/vsdbg
CMD ["dotnet", "watch"]
FROM setup-stage as build-stage
RUN dotnet publish -c Release -o dist
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS production-stage
WORKDIR /app
COPY --from=build-stage /app/dist ./
ENTRYPOINT ["dotnet", "Blog.dll"]