0

I am following along in a book that has a .Net Core MVC and Angular project using the linux version of SQL Server for docker. The project has a docker-compose.yml file like this:

version: "3"

services:
  database:
    image: "microsoft/mssql-server-linux:latest"
    ports:
      - 5100:1433
    environment: 
      - ACCEPT_EULA=Y
      - SA_PASSWORD=mySecret123

and after running dot ef migration add, docker-compose up, and finally dotnet ef update, everything works, the project runs, and the first piece of Entity Framework DataContext data is returned to a razor page and displayed.

But the only hint of the SQL Server running is the info returned in the console window after running docker-compose up. I'm used to viewing and working with the data in SSMS. How can we do this with an SQL Server running in a Docker Container? A console window just letting me know it is running isn't much used to me here.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Sam
  • 4,766
  • 11
  • 50
  • 76

1 Answers1

0

When opening a new Connection in SSMS, I used "127.0.0.1,5100" and also had to use SQL Authentication rather than windows authentication. User Name and password have to match what is specified in your Entity Framework DataContext connection string and the docker-compose.yml file.

Sam
  • 4,766
  • 11
  • 50
  • 76