招聘API
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.3 KiB

#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/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["Znyc.Recruitment.Api/Znyc.Recruitment.Api.csproj", "Znyc.Recruitment.Api/"]
COPY ["Znyc.Recruitment.Services/Znyc.Recruitment.Service.csproj", "Znyc.Recruitment.Services/"]
COPY ["Znyc.Recruitment.Repository/Znyc.Recruitment.Repository.csproj", "Znyc.Recruitment.Repository/"]
COPY ["Znyc.Recruitment.Model/Znyc.Recruitment.Model.csproj", "Znyc.Recruitment.Model/"]
COPY ["Znyc.Recruitment.Common/Znyc.Recruitment.Common.csproj", "Znyc.Recruitment.Common/"]
RUN dotnet restore "Znyc.Recruitment.Api/Znyc.Recruitment.Api.csproj"
COPY . .
WORKDIR "/src/Znyc.Recruitment.Api"
RUN dotnet build "Znyc.Recruitment.Api.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "Znyc.Recruitment.Api.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Znyc.Recruitment.Api.dll"]