mirror of
https://github.com/239573049/FastGateway.git
synced 2026-10-17 05:20:30 +08:00
修改h3的dockerfile
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0.1-bookworm-slim-amd64 AS base
|
||||
USER root
|
||||
RUN apt update \
|
||||
@@ -9,22 +11,23 @@ RUN apt update \
|
||||
&& apt-get install -y libmsquic \
|
||||
&& apt-get purge -y --auto-remove wget && apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
WORKDIR /app
|
||||
EXPOSE 8000
|
||||
EXPOSE 5000
|
||||
EXPOSE 8080
|
||||
EXPOSE 8081
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||
ARG BUILD_CONFIGURATION=Release
|
||||
WORKDIR /src
|
||||
COPY ["FastGateway/FastGateway.csproj", "FastGateway/"]
|
||||
RUN dotnet restore "./FastGateway/./FastGateway.csproj"
|
||||
COPY ["Directory.Build.props", "."]
|
||||
COPY ["src/FastGateway/FastGateway.csproj", "src/FastGateway/"]
|
||||
RUN dotnet restore "./src/FastGateway/FastGateway.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/FastGateway"
|
||||
WORKDIR "/src/src/FastGateway"
|
||||
RUN dotnet build "./FastGateway.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
ARG BUILD_CONFIGURATION=Release
|
||||
RUN dotnet publish "./FastGateway.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false --os linux
|
||||
RUN dotnet publish "./FastGateway.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
|
||||
Reference in New Issue
Block a user