Skip to content

Commit e8462c9

Browse files
authored
Merge pull request #264 from yadavan88/docker-change-mssql
Fix for the Docker issue for SQL Server
2 parents 519f2e4 + 2b6ee36 commit e8462c9

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

1-setup/docker-setup/README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,9 @@ PROFILE=full docker compose up
5858
This starts PostgreSQL, MySQL, SQL Server and Adminer GUI in a single command.
5959

6060
### Using separate GUI
61-
Another way is to start all the databases manually using their on `docker-compose.yml` files. If you have a preferred GUI such as [DB Visualizer](https://www.dbvis.com/), [PG Admin](https://www.pgadmin.org/) or any other, you can use it to connect to the docker databases. In such cases, they can be accessed using `localhost` url with the correct port from respective docker-compose files.
61+
Another way is to start all the databases manually using their on `docker-compose.yml` files. If you have a preferred GUI such as [DB Visualizer](https://www.dbvis.com/), [PG Admin](https://www.pgadmin.org/) or any other, you can use it to connect to the docker databases. In such cases, they can be accessed using `localhost` url with the correct port from respective docker-compose files.
62+
63+
### Diagnostic
64+
Sometimes, when all the docker images are run together, there is a chance of some of them not starting. You may retry the same command 2-3 times to make it work. This is espcially the case with SQL Server.
65+
66+
If there is an issue, it is better to delete the installed docker images and rerun. For example, Microsoft recently changed the path for the tools in the docker and it caused issue. The path is updated now, but sometimes this might cause invalid combination of docker-compose file and the installed image.

1-setup/docker-setup/sqlserver/docker-compose.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ services:
1616
/bin/bash -c "
1717
/opt/mssql/bin/sqlservr &
1818
sleep 30 &&
19-
/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P $${SA_PASSWORD} -i /university-sqlserver.sql &&
19+
/opt/mssql-tools18/bin/sqlcmd -C -S localhost -U SA -P $${SA_PASSWORD} -i /university-sqlserver.sql &&
2020
sleep 10 &&
21-
/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P $${SA_PASSWORD} -d University -i /insert-scripts.sql &&
21+
/opt/mssql-tools18/bin/sqlcmd -C -S localhost -U SA -P $${SA_PASSWORD} -d University -i /insert-scripts.sql &&
2222
while true; do sleep 3600; done
2323
"
2424

0 commit comments

Comments
 (0)