#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/core/aspnet:3.1-buster-slim AS base WORKDIR /app EXPOSE 80 FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build WORKDIR /src COPY dependencies.props . COPY Directory.Build.props . COPY NuGet.config . COPY ["Chatbot.Api/Chatbot.Api.csproj", "Chatbot.Api/"] COPY ["Chatbot.Api.Domain.Data/Chatbot.Api.Domain.Data.csproj", "Chatbot.Api.Domain.Data/"] COPY ["Chatbot.Api.Domain/Chatbot.Api.Domain.csproj", "Chatbot.Api.Domain/"] COPY ["Chatbot.Api.Application/Chatbot.Api.Application.csproj", "Chatbot.Api.Application/"] RUN dotnet restore "Chatbot.Api/Chatbot.Api.csproj" COPY . . WORKDIR "/src/Chatbot.Api" RUN dotnet build "Chatbot.Api.csproj" -c Release -o /app/build FROM build AS publish RUN dotnet publish "Chatbot.Api.csproj" -c Release -o /app/publish FROM base AS final WORKDIR /app COPY --from=publish /app/publish . ENV urls="http://*:80" ENV ConnectionStrings__DatabaseConnection="***REMOVED***" ENV TZ=Europe/Bucharest RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone #Workaround to lower the TLS level in container for old sql server version RUN sed -i 's/TLSv1.2/TLSv1.0/g' /etc/ssl/openssl.cnf ENTRYPOINT ["dotnet", "Chatbot.Api.dll", "--docker"]