Created
February 27, 2021 23:10
-
-
Save bbachi/f8d94e88dbc5def0f19448a39cc5c9a5 to your computer and use it in GitHub Desktop.
Angular DOTNET
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://hub.docker.com/_/microsoft-dotnet | |
FROM mcr.microsoft.com/dotnet/sdk:5.0.103 AS build | |
WORKDIR /build | |
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - | |
RUN apt-get install -y nodejs | |
# copy csproj and restore as distinct layers | |
COPY ./*.csproj . | |
RUN dotnet restore | |
# copy everything else and build app | |
COPY . . | |
WORKDIR /build | |
RUN dotnet publish -c release -o published --no-cache | |
# final stage/image | |
FROM mcr.microsoft.com/dotnet/aspnet:5.0 | |
WORKDIR /app | |
COPY --from=build /build/published ./ | |
ENTRYPOINT ["dotnet", "angular-dotnet-example.dll"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment