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", ./your-binary]
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", ./your-binary]
As long as your command to run is passed as an argument to datadog-init, you will receive full instrumentation.