@@ -23,31 +23,9 @@ RUN dotnet publish ./DbUpdate/DbUpdate.csproj -c Release -o /app/publish
2323FROM mcr.microsoft.com/dotnet/runtime:7.0 AS runtime
2424WORKDIR /app
2525
26- # Install minimal debugging tools
27- RUN apt-get update && apt-get install -y --no-install-recommends \
28- iproute2 iputils-ping net-tools dnsutils && \
29- rm -rf /var/lib/apt/lists/*
30-
31- # Install SQL Server Command Line Tools
32- RUN apt-get update && apt-get install -y curl gnupg
33- RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
34- RUN curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
35- RUN apt-get update && ACCEPT_EULA=Y apt-get install -y mssql-tools
36-
37- # Update PATH to include mssql-tools
38- ENV PATH="${PATH}:/opt/mssql-tools/bin"
39-
4026COPY --from=publish /app/publish .
4127
4228# Copy the ScriptsMigration folder from the build stage to the runtime image
4329COPY --from=build /tmp/ScriptsMigration /app/ScriptsMigration/
4430
45- # Set environment variable for runtime
46- ENV ConnectionStrings__DefaultConnection="${ConnectionStrings__DefaultConnection}"
47-
48- COPY entrypoint.sh /app/entrypoint.sh
49- RUN chmod +x /app/entrypoint.sh
50-
51- ENTRYPOINT ["/app/entrypoint.sh"]
52-
53- #CMD ["dotnet", "DbUpdate.dll"]
31+ CMD ["dotnet", "DbUpdate.dll"]
0 commit comments