From 4a8327b5fa18d7ab8f7e7d32f9f458e3db84d89f Mon Sep 17 00:00:00 2001 From: Token <239573049@qq.com> Date: Thu, 24 Oct 2024 14:20:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=95=9C=E5=83=8F=20?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=8E=88=E6=9D=83=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .dockerignore | 13 +++---------- src/FastGateway.Service/Dockerfile | 9 ++++----- .../Services/AuthorizationService.cs | 1 - 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/.dockerignore b/.dockerignore index 4dad8ad..cd967fc 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,5 +1,4 @@ -**/.classpath -**/.dockerignore +**/.dockerignore **/.env **/.git **/.gitignore @@ -8,6 +7,7 @@ **/.toolstarget **/.vs **/.vscode +**/.idea **/*.*proj.user **/*.dbmdl **/*.jfm @@ -22,11 +22,4 @@ **/secrets.dev.yaml **/values.dev.yaml LICENSE -README.md -!**/.gitignore -!.git/HEAD -!.git/config -!.git/packed-refs -!.git/refs/heads/** -**/node_modules -**/dist \ No newline at end of file +README.md \ No newline at end of file diff --git a/src/FastGateway.Service/Dockerfile b/src/FastGateway.Service/Dockerfile index 3f0e960..367e10f 100644 --- a/src/FastGateway.Service/Dockerfile +++ b/src/FastGateway.Service/Dockerfile @@ -1,5 +1,5 @@ -FROM registry.token-ai.cn/dotnet/aspnet:9.0-preview AS base -USER root +FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base +USER $APP_UID RUN ln -snf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo Asia/Shanghai > /etc/timezone RUN apt update \ && apt-get install -y --no-install-recommends curl \ @@ -11,7 +11,7 @@ RUN apt update \ && apt-get purge -y --auto-remove wget && apt-get clean && rm -rf /var/lib/apt/lists/* WORKDIR /app EXPOSE 8080 - +EXPOSE 8081 FROM node as builder WORKDIR /src @@ -19,8 +19,7 @@ COPY web . RUN npm i RUN npm run build - -FROM registry.token-ai.cn/dotnet/sdk:9.0-preview AS build +FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build ARG BUILD_CONFIGURATION=Release WORKDIR /src COPY ["src/FastGateway.Service/FastGateway.Service.csproj", "src/FastGateway.Service/"] diff --git a/src/FastGateway.Service/Services/AuthorizationService.cs b/src/FastGateway.Service/Services/AuthorizationService.cs index d514a3f..1948127 100644 --- a/src/FastGateway.Service/Services/AuthorizationService.cs +++ b/src/FastGateway.Service/Services/AuthorizationService.cs @@ -10,7 +10,6 @@ public static class AuthorizationServiceExtensions var routeGroupBuilder = app.MapGroup("/api/v1/authorization") .WithTags("授权") .WithDescription("授权") - .RequireAuthorization() .AddEndpointFilter() .WithDisplayName("授权");