emonney / QuickApp

ASP.NET Core / Angular startup project template with complete login, user and role management. Plus other useful services for Quick Application Development
https://www.ebenmonney.com/quickapp
MIT License
1.26k stars 594 forks source link

Dockerfile #223

Open tanerozel opened 1 year ago

tanerozel commented 1 year ago

Dockerfile is required to run on Docker

yoursmanjunad commented 1 year ago

Hey, I can work on this.

tanerozel commented 1 year ago

@yoursmanjunad I think it is work FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base ENV DOTNET_RUNNING_IN_CONTAINER=true ENV DOTNET_USE_POLLING_FILE_WATCHER=true ENV ASPNETCORE_URLS=https://+:443;http://+:80

WORKDIR /app EXPOSE 443 EXPOSE 80

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build RUN apt-get update RUN apt-get install -y curl RUN apt-get install -y libpng-dev libjpeg-dev curl libxi6 build-essential libgl1-mesa-glx RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash - RUN apt-get install -y nodejs

COPY ["QuickApp/QuickApp.csproj", "QuickApp/"] COPY ["DAL/DAL.csproj", "DAL/"] RUN dotnet restore "QuickApp/QuickApp.csproj" COPY . . WORKDIR "QuickApp" RUN dotnet build "QuickApp.csproj" -c Release -o /app/build

FROM build AS publish RUN dotnet publish "QuickApp.csproj" -c Release -o /app/publish FROM base AS final WORKDIR /app COPY --from=publish /app/publish . ENTRYPOINT ["dotnet", "QuickApp.dll"]

tanerozel commented 1 year ago

@emonney @yoursmanjunad I sended a pr for it https://github.com/emonney/QuickApp/pull/225