Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mssql-tools dockerfile for alpine linux #405

Open
b13i opened this issue Dec 27, 2018 · 9 comments
Open

mssql-tools dockerfile for alpine linux #405

b13i opened this issue Dec 27, 2018 · 9 comments

Comments

@b13i
Copy link

b13i commented Dec 27, 2018

Does anyone have the equivalent dockerfile for Alpine Linux? https://github.com/Microsoft/mssql-docker/blob/master/linux/mssql-tools/Dockerfile

These commands are Debian-based

@forkazmoden
Copy link

forkazmoden commented Dec 28, 2018

I tried to use copy --from to build the images for Alpine Linux in order to minimize image size. But I cannot run sqlcmd in the container.
FROM microsoft/mssql-tools FROM alpine COPY --from=microsoft/mssql-tools /opt/microsoft/ /opt/microsoft/ COPY --from=microsoft/mssql-tools /opt/mssql-tools/ /opt/mssql-tools/

Alpine is a good choice to make a lightweight docker container. But for now, it is more convenient to use Ubuntu.

@ravenbluedragon
Copy link

Put the code from https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-2017#alpine-linux into a script and use FROM alpine COPY <script> . RUN <script>.

@croblesm
Copy link

Put the code from https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-2017#alpine-linux into a script and use FROM alpine COPY <script> . RUN <script>.

Interesting approach!

@jvtrigueros
Copy link

I was super excited to try out @ravenbluedragon's suggestion, and it almost worked but the link to download the APK is giving me 404, does anyone know how to get the proper link?

For reference here's the broken link:
https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/mssql-tools_17.5.2.2-1_amd64.apk

@jvtrigueros
Copy link

I found a link that works on this GitHub issue: microsoft/msphpsql#300 (comment)

@croblesm
Copy link

croblesm commented Apr 27, 2020

Hey @bpourkazemi @jvtrigueros

I was able to create a "mssql-tools" customized image using Alpine. You can find the Dockerfile here.

Let me know if you have any questions or comments.

Cheers,

@jvtrigueros
Copy link

@dbamaster that does help! Thanks for sharing :D

@croblesm
Copy link

Hello there!

I made some improvements, the updated image size is 17 MBs. I also created a dedicated repo for this customized image, will be updating the readme info later next week.

Feel free to share your feedback, the goal is to make this image as optimal as possible.
https://github.com/dbamaster/mssql-tools-alpine

Cheers,

@mrlioncub
Copy link

Updatable Latest version on Alpine Linux https://hub.docker.com/r/mrlioncub/mssql-tools (size 7MB)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants