Dockerfile

This commit is contained in:
l.gabrysiak 2024-09-14 16:19:53 +02:00
parent 6117a50db8
commit 9bf623046b
1 changed files with 19 additions and 0 deletions

19
Dockerfile Normal file
View File

@ -0,0 +1,19 @@
# Etap budowania
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY ["pokash-umbraco.csproj", "./"]
RUN dotnet restore "pokash-umbraco.csproj"
COPY . ./
RUN dotnet build "pokash-umbraco.csproj" -c Release -o /app/build
RUN dotnet publish "pokash-umbraco.csproj" -c Release -o /app/publish /p:UseAppHost=false
# Etap uruchamiania
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS final
WORKDIR /app
COPY --from=build /app/publish .
RUN mkdir -p /app/wwwroot/media
EXPOSE 5430
ENV ASPNETCORE_URLS=http://+:5430
ENTRYPOINT ["dotnet", "pokash-umbraco.dll"]