none
SQL CONTAINER CONNECTIVITY RRS feed

  • Question

  • How to access the DB from sql management studio by using the container’s IP Address along with the sql authentication credentials stored in the Docker file ?

    Thanks in Advance

    Best Regards

    Ravi

    Friday, June 24, 2016 11:48 AM

Answers

  • You can get the container IP either by running ipconfig in the container, or with this command:

    docker inspect --format "{{ .NetworkSettings.Networks.nat.IPAddress }}" <containerId>

    SQL Server Management Studio will be able to connect to that IP with SQL authentication, username "sa", and the password you passed when launching the container.

    If you'd like to see more - I have an example of how to deploy the MusicStore app here. That includes how to get the container IP and create the connection string.

    https://github.com/PatrickLang/MusicStore/blob/plang-temp/src/MusicStore/README_Dockerfile.md

    Friday, July 1, 2016 5:38 PM