Skip to content

Instantly share code, notes, and snippets.

@renatogroffe
Created January 15, 2024 09:53
Show Gist options
  • Save renatogroffe/5111b23341097a6f8ca3bba513cf16c5 to your computer and use it in GitHub Desktop.
Save renatogroffe/5111b23341097a6f8ca3bba513cf16c5 to your computer and use it in GitHub Desktop.
FROM mcr.microsoft.com/dotnet/sdk:8.0.101 AS build-env
WORKDIR /app
# Copiar csproj e restaurar dependencias
COPY *.csproj ./
RUN dotnet restore
# Build da aplicacao
COPY . ./
RUN dotnet publish -c Release -o out
# Build da imagem
FROM mcr.microsoft.com/dotnet/aspnet:8.0.1
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "APIContagem.dll"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment