diff --git a/Build/Dockerfile.ENV b/Build/Dockerfile.ENV index cb3b481..6c10bab 100644 --- a/Build/Dockerfile.ENV +++ b/Build/Dockerfile.ENV @@ -1,6 +1,10 @@ # Deckerfile 环境变量测试 FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS EnvStudy -ENV DockerfileEvn_A=InDockerfile +ENV Dockerfile_version=0.0.2 WORKDIR /app COPY WebApiPublish/ /app/ -ENTRYPOINT ["dotnet", "DockerStudyApi.dll"] \ No newline at end of file +ENTRYPOINT ["dotnet", "DockerStudyApi.dll"] + +# docker build -f Dockerfile.ENV -t study.dockerfile.env.webapi:latest -t study.dockerfile.env.webapi:0.0.1 . +# docker run --rm -p 5051:80 -d --name study.dockerfile.env.webapi.run1 study.dockerfile.env.webapi +# 查看日志 docker logs contain_id -f //使用 -f 参数 实时输出,ctl + c 退出(不影响容器运行) diff --git a/Build/WebApiPublish/appsettings.Development.json b/Build/WebApiPublish/appsettings.Development.json index 8983e0f..63ed6e1 100644 --- a/Build/WebApiPublish/appsettings.Development.json +++ b/Build/WebApiPublish/appsettings.Development.json @@ -2,7 +2,7 @@ "Logging": { "LogLevel": { "Default": "Information", - "Microsoft": "Warning", + "Microsoft": "Information", "Microsoft.Hosting.Lifetime": "Information" } } diff --git a/Build/WebApiPublish/appsettings.json b/Build/WebApiPublish/appsettings.json index a543e33..03f2a22 100644 --- a/Build/WebApiPublish/appsettings.json +++ b/Build/WebApiPublish/appsettings.json @@ -13,7 +13,7 @@ "Logging": { "LogLevel": { "Default": "Information", - "Microsoft": "Warning", + "Microsoft": "Information", "Microsoft.Hosting.Lifetime": "Information" } }, diff --git a/DockerStudyApi/appsettings.Development.json b/DockerStudyApi/appsettings.Development.json index 8983e0f..63ed6e1 100644 --- a/DockerStudyApi/appsettings.Development.json +++ b/DockerStudyApi/appsettings.Development.json @@ -2,7 +2,7 @@ "Logging": { "LogLevel": { "Default": "Information", - "Microsoft": "Warning", + "Microsoft": "Information", "Microsoft.Hosting.Lifetime": "Information" } } diff --git a/DockerStudyApi/appsettings.json b/DockerStudyApi/appsettings.json index a543e33..03f2a22 100644 --- a/DockerStudyApi/appsettings.json +++ b/DockerStudyApi/appsettings.json @@ -13,7 +13,7 @@ "Logging": { "LogLevel": { "Default": "Information", - "Microsoft": "Warning", + "Microsoft": "Information", "Microsoft.Hosting.Lifetime": "Information" } },