Datadog expects serverless-init to be the top-level application, with the rest of your app’s command line passed in for serverless-init to execute.
If you already have an entrypoint defined inside your Dockerfile, you can instead modify the CMD argument.
CMD ["/app/datadog-init", "./mvnw", "spring-boot:run"]
If you require your entrypoint to be instrumented as well, you can instead swap your entrypoint and CMD arguments.
ENTRYPOINT ["/app/datadog-init"]
CMD ["/your_entrypoint.sh", "./mvnw", "spring-boot:run"]
As long as your command to run is passed as an argument to datadog-init, you will receive full instrumentation.