Discovery service healthcheck fails. Service unhealthy

services:
  discovery:
    container_name: discovery-service
    build: ./discovery
    healthcheck:
      test: [ "CMD", "curl", "-f", "http://127.0.0.1:8761/actuator/health" ]
      interval: 15s
      timeout: 5s
      retries: 6
      start_period: 90s
    ports:
      - "8761:8761"
    environment:
      PROFILE: test
    networks:
      - microservices-net

Still not working.
I ran health check log for discovery-service to see the reason why the service health check is always failing and below is what I got

$ sudo docker inspect --format='{{json .State.Health}}' discovery-service
{"Status":"unhealthy","FailingStreak":20,"Log":[{"Start":"2025-06-20T22:04:51.755963045Z","End":"2025-06-20T22:04:51.841926311Z","ExitCode":-1,"Output":"OCI runtime exec failed: exec failed: unable to start container process: exec: \"curl\": executable file not found in $PATH: unknown"},{"Start":"2025-06-20T22:05:06.844269369Z","End":"2025-06-20T22:05:06.962293958Z","ExitCode":-1,"Output":"OCI runtime exec failed: exec failed: unable to start container process: exec: \"curl\": executable file not found in $PATH: unknown"},{"Start":"2025-06-20T22:05:21.963429388Z","End":"2025-06-20T22:05:22.07001817Z","ExitCode":-1,"Output":"OCI runtime exec failed: exec failed: unable to start container process: exec: \"curl\": executable file not found in $PATH: unknown"},{"Start":"2025-06-20T22:05:37.071322094Z","End":"2025-06-20T22:05:37.152606104Z","ExitCode":-1,"Output":"OCI runtime exec failed: exec failed: unable to start container process: exec: \"curl\": executable file not found in $PATH: unknown"},{"Start":"2025-06-20T22:05:52.153877974Z","End":"2025-06-20T22:05:52.237502094Z","ExitCode":-1,"Output":"OCI runtime exec failed: exec failed: unable to start container process: exec: \"curl\": executable file not found in $PATH: unknown"}]}

I have tried everything I could all to no aail. Can someone help me fix this problem pls?