Mssql-docker: Cannot log in to microsoft/mssql-server-linux running in a container

Created on 28 Aug 2018  路  1Comment  路  Source: microsoft/mssql-docker

When trying to log into a "microsoft/mssql-server-linux" container running on Ubuntu. I have tried this on two different machines: one running Ubuntu 16.04 and one running 18.04.
The behavior is identical on both.

From the Sql Server log:
Login failed for user 'sa'. Reason: An error occurred while evaluating the password.

This happens when I try to run 'sqlcmd' locally on the Ubuntu machine, or remotely from a Windows 10 machine using SQL Server Management Studio. I get the same error in each case.

The command used to start the SQL Server container is:
sudo docker run -d --name sql -p 1433:1433 -e sa_password=Password1234! -e ACCEPT_EULA=Y microsoft/mssql-server-linux
I have tried several different flavors of encapsulating the password. With no quotes and with double quotes around the password as:

    "sa_password=Password1234!"
    sa_password="Password1234!"
    sa_password=Password1234!

Same result in all cases. I have tried several different passwords.

I realize that similar issues have been presented and I apologize for repeating an apparently old issue, however, I have tried to implement the ideas in those other issues with no success. Although new to Docker, I am not new to SQL Server.

Most helpful comment

This is likely because you are using sa_password as the env var name instead of SA_PASSWORD. Linux is case sensitive. :)

>All comments

This is likely because you are using sa_password as the env var name instead of SA_PASSWORD. Linux is case sensitive. :)

Was this page helpful?
0 / 5 - 0 ratings