Commit d1ba20b2 by lizefeng

fix

parent da4562d9
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
#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/runtime:2.1 AS base
WORKDIR /app
RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
EXPOSE 80
......@@ -8,8 +10,7 @@ EXPOSE 443
RUN apt-get update
RUN apt-get install -y --no-install-recommends libgdiplus libc6-dev
FROM microsoft/dotnet:2.1-sdk-alpine AS build
FROM mcr.microsoft.com/dotnet/sdk:2.1 AS build
WORKDIR /src
COPY ["AutoTurnOver.DownloadService/AutoTurnOver.DownloadService.csproj", "AutoTurnOver.DownloadService/"]
COPY ["AutoTurnOver.DB/AutoTurnOver.DB.csproj", "AutoTurnOver.DB/"]
......
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
WORKDIR /app
RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
EXPOSE 80
EXPOSE 443
# RUN ln -s /lib/x86_64-linux-gnu/libdl-2.24.so /lib/x86_64-linux-gnu/libdl.so
RUN apt-get update
RUN apt-get install -y --no-install-recommends libgdiplus libc6-dev
FROM microsoft/dotnet:2.1-sdk-alpine AS build
WORKDIR /src
COPY ["AutoTurnOver.DownloadService/AutoTurnOver.DownloadService.csproj", "AutoTurnOver.DownloadService/"]
COPY ["AutoTurnOver.DB/AutoTurnOver.DB.csproj", "AutoTurnOver.DB/"]
COPY ["AutoTurnOver.Utility/AutoTurnOver.Utility.csproj", "AutoTurnOver.Utility/"]
COPY ["AutoTurnOver.Models/AutoTurnOver.Models.csproj", "AutoTurnOver.Models/"]
COPY ["AutoTurnOver.Services/AutoTurnOver.Services.csproj", "AutoTurnOver.Services/"]
RUN dotnet restore "AutoTurnOver.DownloadService/AutoTurnOver.DownloadService.csproj"
COPY . .
WORKDIR "/src/AutoTurnOver.DownloadService"
RUN dotnet build "AutoTurnOver.DownloadService.csproj" -c Release -o /app/build
FROM build AS publish
RUN dotnet publish "AutoTurnOver.DownloadService.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "AutoTurnOver.DownloadService.dll"]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment