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
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.
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>.
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!
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
I found a link that works on this GitHub issue: https://github.com/microsoft/msphpsql/issues/300#issuecomment-581573363
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,
@dbamaster that does help! Thanks for sharing :D
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,
Most helpful comment
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.