Quote:
A network-related or instance-specific error occurred while establishing a connection to SQL Server.
This message tells is clearly that your server is not accessible from your machine. There can be several reasons for this problem, ranging from problems such as, incorrect connection string or server name, server being behind a firewall or you behind the firewall, or server not being up and running.
Since your problem happens to be from Docker environment, the issue might be that your service stack that is load balancing the SQL Server containers might not be available on the port or hostname that you are trying to access them from. Please check this guide and verify if you are correctly setting up the SQL Server in Docker,
Configuration options for SQL Server on Docker - SQL Server | Microsoft Docs[
^], it would be even better if you can just try to use a hello SQL Server for a tryout.
Please check these problems and then connect again with your Swagger services, it would work. You can see the list of similar threads on CodeProject on the right side under top experts list.
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and...[
^]
SQL Server 2017 containers on Kubernetes, OpenShift, and Docker Swarm | Microsoft Ignite 2017 | Channel 9[
^]
If this is your connection string,
Data Source=10.10.10.10\SQLEXPRESS,49172;Database=DBName;User ID=**;Password=****;MultipleActiveResultSets=true;
Make sure that Docker is set to listen on that IP and has exposed the port, for other services to connect and interact with.