Skip to content

Instantly share code, notes, and snippets.

@skidvis
Created May 4, 2020 22:59
Show Gist options
  • Save skidvis/188bb0ea990028feb628ba935651997f to your computer and use it in GitHub Desktop.
Save skidvis/188bb0ea990028feb628ba935651997f to your computer and use it in GitHub Desktop.
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
WORKDIR /app
# Copy csproj and restore as distinct layers
COPY *.csproj ./
COPY NuGet.Config ./
RUN dotnet restore
# Copy everything else and build
COPY . ./
RUN dotnet publish -c Release -o out
# Build runtime image
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
WORKDIR /app
COPY --from=build-env /app/out .
COPY config.json ./
COPY emotes.json ./
ENTRYPOINT ["dotnet", "SharkBot.dll"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment