Created
September 21, 2019 10:07
-
-
Save SaurabhLpRocks/0c1b706993eab8008a8e07464cf8c681 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 mcr.microsoft.com/dotnet/core/sdk:2.2 AS base | |
WORKDIR /src | |
# Copy only the project file. | |
# We copied only the project file and not the complete source code | |
# to leaverage the docker's caching capabilities thereby optimizing up the build time. | |
COPY ["CoreApi.csproj", "./"] | |
# Restore the packages | |
RUN dotnet restore "./CoreApi.csproj" | |
# Copy the source code to the /src directory | |
COPY . . | |
# Expose ports 5000 & 5001 as our app will run on these ports | |
EXPOSE 5000 5001 | |
ENTRYPOINT ["dotnet", "watch", "--project=CoreApi.csproj", "run"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment