I have SQL Server 2016 Express, docker for Windows and IIS installed on my Windows 10 machine.
SQL Server Express is configured to listen on 1455 port. The Northwind
You can try to start the container using network mode as host. In that case the container can connect to applications running on the host machine using localhost as a DNS name.
version: '3'
services:
connectsqlserver:
image: connectsqlserver
build:
context: ./ConnectSqlServer
dockerfile: Dockerfile
network_mode: "host"