From 10232885e0340f494f9a492c6642fc2c3a448717 Mon Sep 17 00:00:00 2001 From: "DESKTOP-M4V1LH5\\Jin" Date: Mon, 20 Jul 2020 18:52:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0docker=E5=88=9D=E6=AD=A5?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dockerignore | 25 +++++++++++++++++++++++++ COMCMS.Web/COMCMS.Web.csproj | 2 ++ COMCMS.Web/Dockerfile | 8 ++++++++ 3 files changed, 35 insertions(+) create mode 100644 .dockerignore create mode 100644 COMCMS.Web/Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3729ff0 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,25 @@ +**/.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/COMCMS.Web/COMCMS.Web.csproj b/COMCMS.Web/COMCMS.Web.csproj index 30a8759..58e4df8 100644 --- a/COMCMS.Web/COMCMS.Web.csproj +++ b/COMCMS.Web/COMCMS.Web.csproj @@ -2,11 +2,13 @@ netcoreapp3.1 + Linux + diff --git a/COMCMS.Web/Dockerfile b/COMCMS.Web/Dockerfile new file mode 100644 index 0000000..629140b --- /dev/null +++ b/COMCMS.Web/Dockerfile @@ -0,0 +1,8 @@ +#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. + +FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base +WORKDIR /app +EXPOSE 80 + +COPY . . +ENTRYPOINT ["dotnet", "COMCMS.Web.dll"] \ No newline at end of file