定位推送服务
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

33 rindas
1.2KB

  1. #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.
  2. FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS base
  3. WORKDIR /app
  4. FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
  5. WORKDIR /src
  6. COPY ["TelpoPush.Position.Worker/TelpoPush.Position.Worker.csproj", "TelpoPush.Position.Worker/"]
  7. COPY ["nuget.config","."]
  8. RUN dotnet nuget remove source nuget.org
  9. RUN dotnet nuget add source https://repo.huaweicloud.com/repository/nuget/v3/index.json -n huaweicloud_nuget
  10. RUN dotnet restore "TelpoPush.Position.Worker/TelpoPush.Position.Worker.csproj"
  11. COPY . .
  12. WORKDIR "/src/TelpoPush.Position.Worker"
  13. FROM build AS publish
  14. RUN dotnet publish "TelpoPush.Position.Worker.csproj" -c Release -o /app/publish
  15. FROM base AS final
  16. WORKDIR /app
  17. COPY --from=publish /app/publish .
  18. #COPY pem /app/pem
  19. ENV environment=Development
  20. RUN apk add --no-cache tzdata
  21. ENV TimeZone=Asia/Shanghai
  22. ENV LANG C.UTF-8
  23. ENV ASPNETCORE_ENVIRONMENT_LOG=Development
  24. RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone
  25. ENTRYPOINT dotnet TelpoPush.Position.Worker.dll --environment=$environment