fix: remove apt-get curl install — use bash TCP health check instead
CI/CD / CI · dotnet build (push) Successful in 40s
CI/CD / Deploy · drsousan (push) Successful in 15s

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:
soroush.asadi
2026-06-02 16:03:08 +03:30
parent b3c4615bc7
commit e73d47a875
+1 -3
View File
@@ -37,9 +37,7 @@ VOLUME ["/data", "/app/wwwroot/uploads"]
ENV ASPNETCORE_URLS=http://+:8080
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 \
CMD curl -f http://localhost:8080/healthz || exit 1
CMD bash -c 'echo > /dev/tcp/localhost/8080' || exit 1
ENTRYPOINT ["dotnet", "DrSousan.Api.dll"]