Skip to content

Instantly share code, notes, and snippets.

@dexalex84
Last active April 29, 2017 16:46
Show Gist options
  • Save dexalex84/1551e88273b7393d91a65cfa6671fe3d to your computer and use it in GitHub Desktop.
Save dexalex84/1551e88273b7393d91a65cfa6671fe3d to your computer and use it in GitHub Desktop.
MSSQL 2017 Install on docker
https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-docker
1) Install docker. Create docker-compose.yml
version: "3"
services:
db_mssql:
image: microsoft/mssql-server-linux
container_name: db_mssql
ports:
- 1433:1433
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=password
volumes:
- ./data:/var/opt/mssql
2) docker-compose -d up
TROUBLESHOOTING:
if u have error with starting container:
"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."
u can start manualy to see what is inside /var/opt/mssql/log
keep in mind that standart command which starting mssql in docker:
"docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=password' -p 1433:1433 -d --name mssql_test microsoft/mssql-server-linux"
change it to get to CMD:
"docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=password' -p 1433:1433 -ti --name mssql_test microsoft/mssql-server-linux" /bin/bash
this will open bash for you
root@f61227ea768f:/#
a) run
cd /opt/mssql/bin
b) run
./sqlservr.sh
c) run
echo "$(<errorlog)"
to what inside errorlog file and others if is needed
currently in that situation we see errors in log:
2017-04-29 16:31:50.43 spid19s Password validation failed. The password does not meet SQL Server password policy requirements because
it is not complex enough. The password must be at least 8 characters long and contain characters from
three of the following four sets: Uppercase letters, Lowercase letters, Base 10 digits, and Symbols.
To fix: Just change password to meet requirements
for example "dsflsnflkuwfQWERTY!!!!_"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment