We are developing an application using the TMS XData framework, and our goal is to deploy this application in a Docker container using a Windows base image.
The approach we are trying to follow is to register and start the XData application as a Windows Service inside the container, as this is the same methodology we already use successfully on our traditional Windows virtual machines (VMs).
The Problem:
When trying to replicate this process in the container environment, our XData service fails to start. The container builds and runs, but the service process either seems to not initialize or it terminates silently, without generating any logs or error messages.
To isolate the problem, we performed a control test: we created a basic Windows service using .NET. This test service, when configured in the exact same way in our Dockerfile, registers and starts correctly inside the container. This leads us to believe that our Docker environment and service installation process are correct, and that the issue is related to a specific particularity or dependency of the service compiled in Delphi with the XData framework when running in this containerized environment.
Our Questions:
We would like to request your guidance on the best practices for this scenario.
- Configuration as a Service: Are there any specific configurations, dependencies, or recommendations from TMS for running an XData application as a Windows Service inside a Windows container? Are there any container environment particularities that we should consider?
- Best Practice: Is this approach (Windows Service in a container) considered a best practice for deploying XData applications, or would you recommend an alternative?
- Suggested Alternative: For example, would it be more advisable to run the XData application as a console executable that keeps the container "alive" (a foreground process) instead of a background service? If so, what would be the best way to configure the XData project and the Dockerfile to manage the application's lifecycle in this scenario?
We thank you in advance for any documentation, examples, or recommendations you can provide to help us correctly configure the deployment of our XData application in a containerized Windows environment.