From 93dbc56dd7589c5710ea8fe4e604a6cb45c8cd68 Mon Sep 17 00:00:00 2001 From: apontes77 Date: Sun, 24 Oct 2021 19:54:32 -0300 Subject: [PATCH] Dockerfile criado --- ConversaoPeso.Web/.dockerignore | 25 +++++++++++++++++++++++++ ConversaoPeso.Web/Dockerfile | 15 +++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 ConversaoPeso.Web/.dockerignore create mode 100644 ConversaoPeso.Web/Dockerfile diff --git a/ConversaoPeso.Web/.dockerignore b/ConversaoPeso.Web/.dockerignore new file mode 100644 index 0000000..f3f6cd1 --- /dev/null +++ b/ConversaoPeso.Web/.dockerignore @@ -0,0 +1,25 @@ + class=""> **/.classpath + **/.dockerignore + **/.env + **/.git + **/.gitignore + **/.project + **/.settings + **/.toolstarget + **/.vs + **/.vscode + **/*.*proj.user + **/*.dbmdl + **/*.jfm + **/azds.yaml + **/bin + **/charts + **/docker-compose* + **/Dockerfile* + **/node_modules + **/npm-debug.log + **/obj + **/secrets.dev.yaml + **/values.dev.yaml + LICENSE + README.md \ No newline at end of file diff --git a/ConversaoPeso.Web/Dockerfile b/ConversaoPeso.Web/Dockerfile new file mode 100644 index 0000000..be896ae --- /dev/null +++ b/ConversaoPeso.Web/Dockerfile @@ -0,0 +1,15 @@ +FROM mcr.microsoft.com/dotnet/sdk:5.0 as build-app +WORKDIR /app +EXPOSE 8089 + +COPY *.csproj ./ +RUN dotnet restore + +COPY . . +RUN dotnet publish -c Release -o out + +FROM mcr.microsoft.com/dotnet/aspnet:5.0 as publish +WORKDIR /app + +COPY --from=build-app /app/out . +ENTRYPOINT [ "dotnet", "ConversaoPeso.Web.dll" ]