Answer the question
In order to leave comments, you need to log in
How to write a configuration for Docker on ASP.NET Core + webpack environment?
How to write a Dockerfile on the ASP.NET Core + hot module replacement webpack environment?
webpack for js client
#Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may need to be changed.
#For more information, please see https://aka.ms/containercompat
FROM microsoft/dotnet:2.1-aspnetcore-runtime-nanoserver-sac2016 AS base
WORKDIR /app
EXPOSE 51257
EXPOSE 44386
FROM microsoft/dotnet:2.1-sdk-nanoserver-sac2016 AS build
WORKDIR /src
COPY ["TrainingContest.Web/TrainingContest.Web.csproj", "TrainingContest.Web/"]
COPY ["TrainingContest.Data/TrainingContest.Data.csproj", "TrainingContest.Data/"]
RUN dotnet restore "TrainingContest.Web/TrainingContest.Web.csproj"
COPY . .
WORKDIR "/src/TrainingContest.Web"
RUN dotnet build "TrainingContest.Web.csproj" -c Release -o /app
FROM build AS publish
RUN dotnet publish "TrainingContest.Web.csproj" -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "TrainingContest.Web.dll"]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question