Skip to content

Instantly share code, notes, and snippets.

@ntakouris
Created July 22, 2019 15:26
Show Gist options
  • Save ntakouris/38f6a2340df19719ea5ea23234910dd3 to your computer and use it in GitHub Desktop.
Save ntakouris/38f6a2340df19719ea5ea23234910dd3 to your computer and use it in GitHub Desktop.
FROM microsoft/dotnet:2.2-sdk as build
ARG BUILDCONFIG=RELEASE
ARG VERSION=1.0.0
COPY Tweetbook.csproj /build/
RUN dotnet restore ./build/Tweetbook.csproj
COPY . ./build/
WORKDIR /build/
RUN dotnet publish ./Tweetbook.csproj -c $BUILDCONFIG -o out /p:Version=$VERSION
FROM microsoft/dotnet:2.2-aspnetcore-runtime
WORKDIR /app
COPY --from=build /build/out .
ENTRYPOINT ["dotnet", "Tweetbook.dll"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment