patternsqldockerMinor
MSSQL and AD in a Docker Container
Viewed 0 times
anddockercontainermssql
Problem
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?
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?
Solution
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.
Context
StackExchange DevOps Q#8951, answer score: 7
Revisions (0)
No revisions yet.