You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
758 B
27 lines
758 B
# RUN BOTH CONTAINERS FROM ROOT (folder with .sln file):
|
|
# docker-compose build
|
|
# docker-compose up
|
|
#
|
|
# RUN JUST THIS CONTAINER FROM ROOT (folder with .sln file):
|
|
# docker build --pull -t webrazor -f src/WebRazorPages/Dockerfile .
|
|
#
|
|
# RUN COMMAND
|
|
# docker run --name eshopweb --rm -it -p 5107:5107 webrazor
|
|
FROM microsoft/dotnet:2.2-sdk AS build
|
|
WORKDIR /app
|
|
|
|
COPY *.sln .
|
|
COPY . .
|
|
WORKDIR /app/src/WebRazorPages
|
|
RUN dotnet restore
|
|
|
|
RUN dotnet publish -c Release -o out
|
|
|
|
FROM microsoft/dotnet:2.2-aspnetcore-runtime AS runtime
|
|
WORKDIR /app
|
|
COPY --from=build /app/src/WebRazorPages/out ./
|
|
|
|
# Optional: Set this here if not setting it from docker-compose.yml
|
|
# ENV ASPNETCORE_ENVIRONMENT Development
|
|
|
|
ENTRYPOINT ["dotnet", "Microsoft.eShopWeb.RazorPages.dll"]
|
|
|