mirror of
https://gitee.com/dotnetchina/Furion.git
synced 2025-12-06 15:59:25 +08:00
21 lines
819 B
Docker
21 lines
819 B
Docker
#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/sdk:9.0 AS build
|
|
WORKDIR /src
|
|
|
|
RUN git init
|
|
RUN git remote add origin https://gitee.com/dotnetchina/Furion.git
|
|
RUN git config core.sparseCheckout true
|
|
RUN echo samples >> .git/info/sparse-checkout
|
|
RUN echo framework >> .git/info/sparse-checkout
|
|
RUN git pull --depth 1 origin v5-transition
|
|
|
|
RUN dotnet restore "./samples/Furion.Web.Entry/Furion.Web.Entry.csproj"
|
|
RUN dotnet publish "./samples/Furion.Web.Entry/Furion.Web.Entry.csproj" -c release -o /app --no-restore
|
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:9.0
|
|
WORKDIR /app
|
|
COPY --from=build /app ./
|
|
EXPOSE 8080
|
|
EXPOSE 8081
|
|
ENTRYPOINT ["dotnet", "Furion.Web.Entry.dll"] |