Hi all,
I am using windows 10 pro with docker host and my docker version as below
I created a 'docker-Compose.yaml' file for creating a api container and sql db container and below is 'docker-Compose.yaml' file as 
Below is my 'docker-Compose.yaml' file..
version: '3.7'
services:
ms-sql-server:
image: 'microsoft/mssql-server-linux:2017-latest'
ports:
- '1401:1433'
environment:
SA_PASSWORD: Pa$$w0rd2019
ACCEPT_EULA: Y
MSSQL_PID: Developer
colour-api:
build:
context: ColourAPI
dockerfile: Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ConnectionStrings_DefaultConnection=Server=localhost,1401;database=Colours;User Id=sa;Password=Pa$$w0rd2019
ports:
- '8080:80'
depends_on:
- ms-sql-server
I run 'docker-compose up --build' command at powershell and 2 containers were created successfully but api container hv a ERROR message like
"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 that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 35 - An internal exception was caught)".
Pls help me on how to pass Db container connection string to api container.
Thanks,
