File tree Expand file tree Collapse file tree 3 files changed +62
-10
lines changed Expand file tree Collapse file tree 3 files changed +62
-10
lines changed Original file line number Diff line number Diff line change 1+ # SQL Server Command Line Tools
2+ FROM alpine
3+
4+ LABEL maintainer="SQL Server Engineering Team"
5+
6+ RUN apk add curl gnupg
7+
8+ #Download the desired package(s)
9+ RUN curl -O https://download.microsoft.com/download/b/9/f/b9f3cce4-3925-46d4-9f46-da08869c6486/msodbcsql18_18.0.1.1-1_amd64.apk \
10+ && curl -O https://download.microsoft.com/download/b/9/f/b9f3cce4-3925-46d4-9f46-da08869c6486/mssql-tools18_18.0.1.1-1_amd64.apk
11+
12+
13+ #(Optional) Verify signature, if 'gpg' is missing install it using 'apk add gnupg':
14+ RUN curl -O https://download.microsoft.com/download/b/9/f/b9f3cce4-3925-46d4-9f46-da08869c6486/msodbcsql18_18.0.1.1-1_amd64.sig \
15+ && curl -O https://download.microsoft.com/download/b/9/f/b9f3cce4-3925-46d4-9f46-da08869c6486/mssql-tools18_18.0.1.1-1_amd64.sig
16+
17+ RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --import - \
18+ && gpg --verify msodbcsql18_18.0.1.1-1_amd64.sig msodbcsql18_18.0.1.1-1_amd64.apk \
19+ && gpg --verify mssql-tools18_18.0.1.1-1_amd64.sig mssql-tools18_18.0.1.1-1_amd64.apk
20+
21+
22+ #Install the package(s)
23+ RUN apk add --allow-untrusted msodbcsql18_18.0.1.1-1_amd64.apk \
24+ && apk add --allow-untrusted mssql-tools18_18.0.1.1-1_amd64.apk \
25+ && rm -f msodbcsql18_18.0.1.1-1_amd64.apk mssql-tools18_18.0.1.1-1_amd64.apk
26+
27+
28+ CMD /bin/bash
Original file line number Diff line number Diff line change 1+ # SQL Server Command Line Tools
2+ FROM debian:11
3+
4+ LABEL maintainer="SQL Server Engineering Team"
5+
6+ # apt-get and system utilities
7+ RUN apt-get update && apt-get install -y \
8+ curl apt-transport-https debconf-utils gnupg2
9+
10+ # adding custom MS repository
11+ RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
12+ RUN curl https://packages.microsoft.com/config/debian/11/prod.list > /etc/apt/sources.list.d/mssql-release.list
13+
14+ # install SQL Server drivers and tools
15+ RUN apt-get update && ACCEPT_EULA=Y apt-get install -y msodbcsql18 mssql-tools18
16+ RUN echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bashrc
17+ RUN /bin/bash -c "source ~/.bashrc"
18+
19+
20+
21+ RUN apt-get -y install locales \
22+ && rm -rf /var/lib/apt/lists/*
23+ RUN locale-gen en_US.UTF-8
24+ RUN localedef -i en_US -f UTF-8 en_US.UTF-8
25+
26+
27+ CMD /bin/bash
Original file line number Diff line number Diff line change 11# SQL Server Command Line Tools
2- FROM ubuntu:16 .04
2+ FROM ubuntu:20 .04
33
44LABEL maintainer="SQL Server Engineering Team"
55
66# apt-get and system utilities
77RUN apt-get update && apt-get install -y \
8- curl apt-transport-https debconf-utils \
9- && rm -rf /var/lib/apt/lists/*
8+ curl apt-transport-https debconf-utils gnupg2
109
1110# adding custom MS repository
1211RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
13- RUN curl https://packages.microsoft.com/config/ubuntu/16 .04/prod.list > /etc/apt/sources.list.d/mssql-release.list
12+ RUN curl https://packages.microsoft.com/config/ubuntu/20 .04/prod.list > /etc/apt/sources.list.d/mssql-release.list
1413
1514# install SQL Server drivers and tools
16- RUN apt-get update && ACCEPT_EULA=Y apt-get install -y msodbcsql mssql-tools
17- RUN echo 'export PATH="$PATH:/opt/mssql-tools /bin"' >> ~/.bashrc
15+ RUN apt-get update && ACCEPT_EULA=Y apt-get install -y msodbcsql18 mssql-tools18
16+ RUN echo 'export PATH="$PATH:/opt/mssql-tools18 /bin"' >> ~/.bashrc
1817RUN /bin/bash -c "source ~/.bashrc"
1918
2019
2120
22- RUN apt-get -y install locales
21+ RUN apt-get -y install locales \
22+ && rm -rf /var/lib/apt/lists/*
2323RUN locale-gen en_US.UTF-8
2424RUN update-locale LANG=en_US.UTF-8
2525
2626
2727
2828CMD /bin/bash
29-
30-
31-
You can’t perform that action at this time.
0 commit comments