add ci
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
||||
WORKDIR /src
|
||||
|
||||
COPY DevOpsTest.csproj ./
|
||||
RUN dotnet restore DevOpsTest.csproj
|
||||
|
||||
COPY . ./
|
||||
RUN dotnet publish DevOpsTest.csproj \
|
||||
--configuration Release \
|
||||
--no-restore \
|
||||
--output /app/publish \
|
||||
/p:UseAppHost=false
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final
|
||||
WORKDIR /app
|
||||
|
||||
ENV ASPNETCORE_URLS=http://+:8080 \
|
||||
ASPNETCORE_ENVIRONMENT=Production
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
COPY --from=build /app/publish ./
|
||||
ENTRYPOINT ["dotnet", "DevOpsTest.dll"]
|
||||
Reference in New Issue
Block a user