#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. FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build # Install clang/zlib1g-dev dependencies for publishing to native RUN apk add clang zlib-static zlib-dev musl-dev libc6-compat cmake autoconf make openssl-dev openssl-libs-static icu-static icu-dev ARG BUILD_CONFIGURATION=Release WORKDIR /src COPY ["AS1024.NetworkQuality.Server/AS1024.NetworkQuality.Server.csproj", "AS1024.NetworkQuality.Server/"] RUN dotnet restore "./AS1024.NetworkQuality.Server/./AS1024.NetworkQuality.Server.csproj" COPY . . WORKDIR "/src/AS1024.NetworkQuality.Server" RUN dotnet build "./AS1024.NetworkQuality.Server.csproj" -c $BUILD_CONFIGURATION -o /app/build FROM build AS publish ARG BUILD_CONFIGURATION=Release RUN dotnet publish "./AS1024.NetworkQuality.Server.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:StaticOpenSslLinking=true /p:StaticExecutable=true /p:StaticallyLinked=true /p:StripSymbols=true /p:DebugType=None /p:DebugSymbols=false FROM scratch AS final WORKDIR /tmp WORKDIR /app EXPOSE 8080 COPY --from=publish /app/publish . COPY --from=build /etc/ssl/certs/* /etc/ssl/certs/ ENTRYPOINT ["./AS1024.NetworkQuality.Server"]