定位推送服务
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

Dockerfile 1.2KB

hace 7 meses
123456789101112131415161718192021222324252627282930313233
  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