fix: remove apt-get curl install — use bash TCP health check instead
archive.ubuntu.com is unreachable from the build server, causing apt-get to time out and fail every build. curl was only used for the HEALTHCHECK. Replace with a zero-dependency bash TCP check: bash -c 'echo > /dev/tcp/localhost/8080' No packages needed, no external network access required. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -37,9 +37,7 @@ VOLUME ["/data", "/app/wwwroot/uploads"]
|
|||||||
ENV ASPNETCORE_URLS=http://+:8080
|
ENV ASPNETCORE_URLS=http://+:8080
|
||||||
ENV ASPNETCORE_ENVIRONMENT=Production
|
ENV ASPNETCORE_ENVIRONMENT=Production
|
||||||
|
|
||||||
RUN apt-get update -qq && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
HEALTHCHECK --interval=15s --timeout=10s --start-period=30s --retries=3 \
|
HEALTHCHECK --interval=15s --timeout=10s --start-period=30s --retries=3 \
|
||||||
CMD curl -f http://localhost:8080/healthz || exit 1
|
CMD bash -c 'echo > /dev/tcp/localhost/8080' || exit 1
|
||||||
|
|
||||||
ENTRYPOINT ["dotnet", "DrSousan.Api.dll"]
|
ENTRYPOINT ["dotnet", "DrSousan.Api.dll"]
|
||||||
|
|||||||
Reference in New Issue
Block a user