Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database Containers Sample #473

Open
mick-anderson24 opened this issue Sep 18, 2024 · 1 comment
Open

Database Containers Sample #473

mick-anderson24 opened this issue Sep 18, 2024 · 1 comment

Comments

@mick-anderson24
Copy link

mick-anderson24 commented Sep 18, 2024

I've used this sample to implement the MSSql database container and pre-configure a database and table. The issue I have been running into is when the application starts and tries to spin up the MSSql database, it will intermittently fail to find the entrypoint.sh file. I would think copy and paste the entrypoint.sh file in this sample into my solution and it magically starts working again the next time I run it.

The error log in the container says it couldn't find the file entrypoint.sh even though the file didn't change nor did the name of the file. It seems to happen after I change branches from one that doesn't have this setup to the branch with these changes in it. Once I do that copy it works for the rest of the day Any ideas on why this happens?

Aspire console window:
fail: Aspire.Hosting.Dcp.dcpctrl.ContainerReconciler[0] could not determine host address and port for container port {"Container": {"name":"sqlserver-fbcgzhnc"}, "Reconciliation": 16, "error": "container '/sqlserver-fbcgzhnc' is not running: exited"} fail: Aspire.Hosting.Dcp.dcpctrl.ContainerReconciler[0] could not create Endpoint object {"Container": {"name":"sqlserver-fbcgzhnc"}, "Reconciliation": 16, "ServiceName": "sqlserver", "Workload": "/sqlserver-fbcgzhnc", "error": "container '/sqlserver-fbcgzhnc' is not running: exited"}

SqlServer container: 2024-09-18 12:33:13 exec /usr/config/entrypoint.sh: no such file or directory

@mick-anderson24
Copy link
Author

Solution structure for the AppHost:
image

Program.cs for AppHost:
image

entrypoint.sh file in AppHost
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant