mssql-cli
mssql-cli copied to clipboard
Publish mssql-cli on Alpine
I just installed mssql-cli via "pip3 install mssql-cli" by Dockerfile on a docker image based on alpine:3.11.3. I got version 0.17.3. Installation did not complain about anything (downloaded mssqlcli-1.0.4.tar.gz)
About python: /usr/bin/python is symlinked to python3. Dependencies icu-libs and libunwind are installed one step before via apk
I had to manually create the file "/usr/lib/python3.8/site-packages/mssqlcli/mssqlclirc" and fill it with the content from this repo, since mssql-cli would not work without even if I give another with the --mssqlclirc option. So this was tackled.
But when I run mssql-cli now in the container, it tells me "'MssqlCli' object has no attribute 'sqltoolsclient'". So as in Issue #247, but not after installation from git.
The solution from #247 did not work, since the mentioned file does no longer exist and when I download the one file existing (Microsoft.SqlTools.ServiceLayer-rhel-x64-netcoreapp2.2.tar.gz) tar tells me it is not an archive (independent from tar -xzf or gunzip and then tar -xf): "tar: invalid tar magic"
Unfortunately, we don't support Alpine, for now. The version you installed is an sdist which is unfortunately broken. I actually didn't realize it was still up, thanks for bringing this to my attention.
The good news is we're working on supporting both Debian and CentOS. Right now our latest dev version for Ubuntu is working in Docker. A stable version will be released soon. So if you don't need to use Alpine, an Ubuntu container should fix your problem.
you can see https://hub.docker.com/r/dbcliorg/mssql-cli
I did a pip install mssql-cli
in my Alpine container, and ended up with version 0.3, which didn't work at all.