2

I'm trying to setup SQLserver on my mac using Docker. When I start it, it seems to be working, but when I try to connect with mssql, it crashes. I have tried with localhost instead of 0.0.0.0, same result.

iMac benoitd$ **docker run** -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=DB22017' -p 
1433:1433 -d microsoft/mssql-server-linux

ee2f1a94410dfb6e5f39ba009ffee20b906270e9602d831ff2344e93d2ec5d14

iMac benoitd$ **docker ps**

CONTAINER ID        IMAGE                          COMMAND                  CREATED             STATUS              PORTS                    NAMES
ee2f1a94410d        microsoft/mssql-server-linux   "/bin/sh -c /opt/mssq"   4 seconds ago       Up 2 seconds        0.0.0.0:1433->1433/tcp   awesome_mahavira

iMac benoitd$ **mssql -s 0.0.0.0:1433 -u sa -p 'DB22017'**

Connecting to 0.0.0.0:1433...
Error: Failed to connect to 0.0.0.0:1433:1433 - getaddrinfo ENOTFOUND 0.0.0.0:1433 0.0.0.0:1433:1433

iMac benoitd$ **docker ps**

CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
8
  • I'd guess that you do not need to provide a port with your -s parameter, for example: mssql -s 0.0.0.0 -u sa -p 'DB22017', but I haven't used mssql yet... Commented Jan 3, 2017 at 15:54
  • tried it. no success. The weird thing is that the sqlserver process dies when I try to connect. Commented Jan 3, 2017 at 16:06
  • Did you check the logs? When I try to run your docker run command it crashes after a few seconds with this error message - Configuring Microsoft(R) SQL Server(R)... Microsoft(R) SQL Server(R) setup failed with error code 1. Please check the setup log in /var/opt/mssql/log for more information. Commented Jan 3, 2017 at 16:34
  • I don't see /var/opt. I'm on a Mac. Commented Jan 3, 2017 at 16:48
  • Not on your mac, in the container. Start the mssql server without -d command. It then runs in the normal mode and not in daemon mode. You see all the logs on your console. Commented Jan 3, 2017 at 16:55

1 Answer 1

4

d'oh.... the problem was with the password for sql server. It need to be a strong pw.

thanks for your help! and happy new year :)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.