Last active
December 7, 2021 18:14
-
-
Save croblesm/bb9c27ae4c9784c264147d8ff58d3c25 to your computer and use it in GitHub Desktop.
msql-tools custom image using Alpine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SQL Server Command Line Tools - custom image | |
# From Alpine 3.11 (~5 MBs) | |
FROM alpine:3.11 | |
LABEL maintainer="@dbamastery" | |
# Installing system utilities | |
RUN apk add --no-cache curl gnupg | |
# Adding custom MS repository for mssql-tools and msodbcsql | |
RUN curl -O https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.5.2.1-1_amd64.apk | |
RUN curl -O https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/mssql-tools_17.5.2.1-1_amd64.apk | |
# Verifying signature | |
RUN curl -O https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.5.2.1-1_amd64.sig | |
RUN curl -O https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/mssql-tools_17.5.2.1-1_amd64.sig | |
# Importing gpg key | |
RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --import - | |
RUN gpg --verify msodbcsql17_17.5.2.1-1_amd64.sig msodbcsql17_17.5.2.1-1_amd64.apk && gpg --verify mssql-tools_17.5.2.1-1_amd64.sig mssql-tools_17.5.2.1-1_amd64.apk | |
# Installing packages | |
RUN echo y | apk add --allow-untrusted msodbcsql17_17.5.2.1-1_amd64.apk mssql-tools_17.5.2.1-1_amd64.apk | |
# Adding SQL Server tools to $PATH | |
ENV PATH=$PATH:/opt/mssql-tools/bin | |
CMD /bin/sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thought there was a way of making a pull request from forked gist to gist, here's my contribution
https://gist.github.com/jmarcos-cano/fbc02fb27dcb2485e82f6f9105aa8fa2