7

I am attempting to use Active Directory authentication with SQL Server on Linux running inside the official MSFT Docker container for MSSQL (https://hub.docker.com/_/microsoft-mssql-server)

I am in the midst of working through this tutorial, but I heard from a coworker that it wouldn't work in a container. He did not say why. He did say which particular step he was doubtful about ('Join SQL Server host to AD domain')

https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-active-directory-authentication?view=sql-server-2017

Is there any reason why I can't complete the 'Join SQL Server host to AD domain' step if I'm using containers?

1
  • Were you successful, and if so how did you test it, perhaps with some kind of impersonation ?
    – Davos
    Jan 19 at 12:03
7

You absolutely can do this. However, you will need to make sure that the following is happening:

  • Setup the Docker host on the MSSQL computer in such a way that it can reach the AD server. Using a bridge network may help (especially if you are using Docker for Windows). If using Docker Toolkit you may need to look into a solution like port forwarding.
  • Commit your configuration changes to a new Docker image. This will allow you to move the MSSQL container to a new computer or even run it with Kubernetes/Orchestration tooling.
  • Map your MSSQL container to a Volume for persistence. Otherwise the data in the container will be eliminated between container restarts.
0

As per the attached document, I see no issue with executing this task. The one thing that you need to do update your container with a configuration that is needed to reach AD server.

That means those changes can be done in live SQL server container and committed or add to a Dockerfile and build.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.