Created
May 14, 2019 08:56
-
-
Save guftall/91baf9b8a63762dce099e6f6ea03bf7c to your computer and use it in GitHub Desktop.
docker file for aspnetcore angular spa
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
FROM microsoft/dotnet:2.2-sdk AS build | |
WORKDIR /app | |
COPY server.sln . | |
COPY ./Server/Server.csproj ./Server/ | |
COPY ./Logger/Logger.csproj ./Logger/ | |
COPY ./Server ./Server/ | |
COPY ./Logger/. ./Logger/ | |
RUN wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash \ | |
&& . /root/.nvm/nvm.sh \ | |
&& nvm install 10.15.0 \ | |
&& nvm use 10.15.0 \ | |
&& node -v \ | |
&& dotnet build ./Server/Server.csproj \ | |
&& dotnet build ./Logger/Logger.csproj | |
FROM build AS publish | |
WORKDIR /app | |
# COPY Server/AdminApp/assets ./Server/AdminApp/node_modules/bootstrap3-rtl/dist | |
RUN . /root/.nvm/nvm.sh \ | |
&& nvm use 10.15.0 \ | |
&& dotnet publish ./Server/Server.csproj -o /app/out | |
FROM microsoft/dotnet:2.2-aspnetcore-runtime AS runtime | |
WORKDIR /app | |
COPY --from=publish /app/out ./ | |
ENTRYPOINT ["dotnet", "Server.dll"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment