I have installed a mssql server using docker microsoft/mssql-server-linux. It behaves the same as a regular mssql server. i.e my client can access it exactly the same way they access a regular mssql server.
Now I am installing mssql-tools using docker: mcr.microsoft.com/mssql-tools
Looks like in order to use the mssql-tools to access a mssql server (they want sqlcmd/bcp), my client has to run
docker run -it mcr.microsoft.com/mssql-tools
and then run
sqlcmd -S 127.0.0.1 -U sa”
under a new interface
root@1396d2e50672:
It is not convenient because he has to change all the code where sqlcmd/bcp has been directly called to access the mssql server.
Is it how a container based mssql-tools works? How can I install a mssql-tool container without having the clients change their API?
How do you want to run it?
There are multiple strategies here This refers to the server but that contains the tools as well
What I usually do is pass in an entrypoint change the workdir to a volume mount and mount a volume of scripts.
Note the options to sqlcmd are passed as usual after the image
untested...