docker-compose.yml
version: "3"
services:
coreapi:
build:
context: ./theapi
dockerfile: Dockerfile
ports:
- "5000:5000"
sqlserver:
build:
context: ./sqlserver
ports:
- "1433:1433"
environment:
- ACCEPT_EULA="Y"
- SA_PASSWORD="Pwd12345!"
angular:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "4300:4200"
I read similar post on stackoverflow and add opened inbound port on my VM.
But to no avail:
NSG - Inbound port rule -> Allow any "source port" to connect to your Sql server running in Docker by changing the value from 1433 to *.
It will resolve your issue. I replicated your steps and reproduced your issue. This fix will resolve it.
Reference I used to do your setup https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker?view=sql-server-ver15&pivots=cs1-bash
NOTE: There is a separate MS Sql server image in docker for Ubuntu. I believe you are using an image for linux.
My sql server which is running in docker inside ubuntu Az VM:
Connection from SSMS:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.