diff --git a/linux/mssql-tools/Dockerfile b/linux/mssql-tools/Dockerfile index b0024dc7..e9abbdef 100644 --- a/linux/mssql-tools/Dockerfile +++ b/linux/mssql-tools/Dockerfile @@ -5,7 +5,7 @@ LABEL maintainer="SQL Server Engineering Team" # apt-get and system utilities RUN apt-get update && apt-get install -y \ - curl apt-transport-https debconf-utils \ + curl apt-transport-https debconf-utils unzip \ && rm -rf /var/lib/apt/lists/* # adding custom MS repository @@ -14,7 +14,15 @@ RUN curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt # install SQL Server drivers and tools RUN apt-get update && ACCEPT_EULA=Y apt-get install -y msodbcsql mssql-tools -RUN echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc + +# Install SQLPackage for Linux and make it executable +RUN wget -O /tmp/sqlpackage.zip https://go.microsoft.com/fwlink/?linkid=2113331 \ + && unzip -qq /tmp/sqlpackage.zip -d /opt/sqlpackage \ + && chmod +x /opt/sqlpackage/sqlpackage \ + && rm /tmp/sqlpackage.zip + +# Add mssql-tools and sqlpackage paths +RUN echo 'export PATH="$PATH:/opt/mssql-tools/bin:/opt/sqlpackage"' >> ~/.bashrc RUN /bin/bash -c "source ~/.bashrc"