Merge pull request #1431 from bestlong/workspace-mssql-build-fail
fix workspace mssql build fail
This commit is contained in:
commit
91784cbf8a
|
@ -535,74 +535,32 @@ ARG INSTALL_MSSQL=true
|
||||||
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
|
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
|
||||||
|
|
||||||
RUN if [ ${INSTALL_MSSQL} = true ]; then \
|
RUN if [ ${INSTALL_MSSQL} = true ]; then \
|
||||||
#####################################
|
|
||||||
# Install Depenencies:
|
|
||||||
#####################################
|
|
||||||
cd / && \
|
|
||||||
apt-get install -y --force-yes wget apt-transport-https curl freetds-common libsybdb5 freetds-bin unixodbc unixodbc-dev && \
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# The following steps were taken from
|
# The following steps were taken from
|
||||||
# Microsoft's github account:
|
# https://github.com/Microsoft/msphpsql/wiki/Install-and-configuration
|
||||||
# https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-getting-pdo_sqlsrv-for-PHP-7.0-on-Debian-in-3-ways
|
|
||||||
#####################################
|
#####################################
|
||||||
|
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
|
||||||
# Add PHP 7 repository
|
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list && \
|
||||||
# for Debian jessie
|
apt-get update && \
|
||||||
# And System upgrade
|
ACCEPT_EULA=Y apt-get install -yqq msodbcsql=13.0.1.0-1 mssql-tools=14.0.2.0-1 && \
|
||||||
cd / && \
|
apt-get install -yqq unixodbc-dev-utf16 && \
|
||||||
echo "deb http://packages.dotdeb.org jessie all" \
|
ln -sfn /opt/mssql-tools/bin/sqlcmd-13.0.1.0 /usr/bin/sqlcmd && \
|
||||||
| tee /etc/apt/sources.list.d/dotdeb.list \
|
ln -sfn /opt/mssql-tools/bin/bcp-13.0.1.0 /usr/bin/bcp && \
|
||||||
&& wget -qO- https://www.dotdeb.org/dotdeb.gpg \
|
ACCEPT_EULA=Y apt-get install -yqq \
|
||||||
| apt-key add - \
|
unixodbc \
|
||||||
&& apt-get update -yqq \
|
unixodbc-dev \
|
||||||
&& apt-get upgrade -qq && \
|
libgss3 \
|
||||||
|
odbcinst \
|
||||||
# Install UnixODBC
|
msodbcsql \
|
||||||
# Compile odbc_config as it is not part of unixodbc package
|
locales && \
|
||||||
cd / && \
|
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
|
||||||
apt-get install -y whiptail \
|
locale-gen && \
|
||||||
unixodbc libgss3 odbcinst devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev \
|
pecl install sqlsrv-4.3.0 pdo_sqlsrv-4.3.0 && \
|
||||||
&& dget -u -x http://http.debian.net/debian/pool/main/u/unixodbc/unixodbc_2.3.1-3.dsc \
|
apt-get install -y locales && \
|
||||||
&& cd unixodbc-*/ \
|
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
|
||||||
&& ./configure && make && make install \
|
locale-gen && \
|
||||||
&& cp -v ./exe/odbc_config /usr/local/bin/ && \
|
echo "extension=sqlsrv.so" > /etc/php/7.0/cli/conf.d/20-sqlsrv.ini && \
|
||||||
|
echo "extension=pdo_sqlsrv.so" > /etc/php/7.0/cli/conf.d/20-pdo_sqlsrv.ini \
|
||||||
# Fake uname for install.sh
|
|
||||||
printf '#!/bin/bash\nif [ "$*" == "-p" ]; then echo "x86_64"; else /bin/uname "$@"; fi' \
|
|
||||||
| tee /usr/local/bin/uname \
|
|
||||||
&& chmod +x /usr/local/bin/uname && \
|
|
||||||
|
|
||||||
# Microsoft ODBC Driver 13 for Linux
|
|
||||||
# Note: There's a copy of this tar on my hubiC
|
|
||||||
cd / && \
|
|
||||||
wget -nv -O msodbcsql-13.0.0.0.tar.gz \
|
|
||||||
"https://meetsstorenew.blob.core.windows.net/contianerhd/Ubuntu%2013.0%20Tar/msodbcsql-13.0.0.0.tar.gz?st=2016-10-18T17%3A29%3A00Z&se=2022-10-19T17%3A29%3A00Z&sp=rl&sv=2015-04-05&sr=b&sig=cDwPfrouVeIQf0vi%2BnKt%2BzX8Z8caIYvRCmicDL5oknY%3D" \
|
|
||||||
&& tar -xf msodbcsql-13.0.0.0.tar.gz \
|
|
||||||
&& cd msodbcsql-*/ \
|
|
||||||
&& ldd lib64/libmsodbcsql-13.0.so.0.0 \
|
|
||||||
&& ./install.sh install --accept-license \
|
|
||||||
&& ls -l /opt/microsoft/msodbcsql/ \
|
|
||||||
&& odbcinst -q -d -n "ODBC Driver 13 for SQL Server" && \
|
|
||||||
|
|
||||||
|
|
||||||
#####################################
|
|
||||||
# Install sqlsrv y pdo_sqlsrv
|
|
||||||
# extensions:
|
|
||||||
#####################################
|
|
||||||
|
|
||||||
pecl install sqlsrv-4.0.8 && \
|
|
||||||
pecl install pdo_sqlsrv-4.0.8 && \
|
|
||||||
|
|
||||||
#####################################
|
|
||||||
# Set locales for the container
|
|
||||||
#####################################
|
|
||||||
|
|
||||||
apt-get install -y locales \
|
|
||||||
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
|
|
||||||
&& locale-gen \
|
|
||||||
&& echo "extension=sqlsrv.so" > /etc/php/7.0/cli/conf.d/20-sqlsrv.ini \
|
|
||||||
&& echo "extension=pdo_sqlsrv.so" > /etc/php/7.0/cli/conf.d/20-pdo_sqlsrv.ini \
|
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
|
|
|
@ -544,76 +544,32 @@ ARG INSTALL_MSSQL=false
|
||||||
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
|
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
|
||||||
|
|
||||||
RUN if [ ${INSTALL_MSSQL} = true ]; then \
|
RUN if [ ${INSTALL_MSSQL} = true ]; then \
|
||||||
#####################################
|
|
||||||
# Install Depenencies:
|
|
||||||
#####################################
|
|
||||||
cd / && \
|
|
||||||
apt-get update -yqq && \
|
|
||||||
apt-get install -y --force-yes wget apt-transport-https curl freetds-common libsybdb5 freetds-bin unixodbc unixodbc-dev && \
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# The following steps were taken from
|
# The following steps were taken from
|
||||||
# Microsoft's github account:
|
# https://github.com/Microsoft/msphpsql/wiki/Install-and-configuration
|
||||||
# https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-getting-pdo_sqlsrv-for-PHP-7.0-on-Debian-in-3-ways
|
|
||||||
#####################################
|
#####################################
|
||||||
|
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
|
||||||
# Add PHP 7 repository
|
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list && \
|
||||||
# for Debian jessie
|
apt-get update && \
|
||||||
# And System upgrade
|
ACCEPT_EULA=Y apt-get install -yqq msodbcsql=13.0.1.0-1 mssql-tools=14.0.2.0-1 && \
|
||||||
cd / && \
|
apt-get install -yqq unixodbc-dev-utf16 && \
|
||||||
echo "deb http://packages.dotdeb.org jessie all" \
|
ln -sfn /opt/mssql-tools/bin/sqlcmd-13.0.1.0 /usr/bin/sqlcmd && \
|
||||||
| tee /etc/apt/sources.list.d/dotdeb.list \
|
ln -sfn /opt/mssql-tools/bin/bcp-13.0.1.0 /usr/bin/bcp && \
|
||||||
&& wget -qO- https://www.dotdeb.org/dotdeb.gpg \
|
ACCEPT_EULA=Y apt-get install -yqq \
|
||||||
| apt-key add - \
|
unixodbc \
|
||||||
&& apt-get update -yqq \
|
unixodbc-dev \
|
||||||
&& apt-get upgrade -qq && \
|
libgss3 \
|
||||||
|
odbcinst \
|
||||||
# Install UnixODBC
|
msodbcsql \
|
||||||
# Compile odbc_config as it is not part of unixodbc package
|
locales && \
|
||||||
cd / && \
|
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
|
||||||
apt-get update -yqq && \
|
locale-gen && \
|
||||||
apt-get install -y whiptail \
|
pecl install sqlsrv-4.3.0 pdo_sqlsrv-4.3.0 && \
|
||||||
unixodbc libgss3 odbcinst devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev \
|
apt-get install -y locales && \
|
||||||
&& dget -u -x http://http.debian.net/debian/pool/main/u/unixodbc/unixodbc_2.3.1-3.dsc \
|
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
|
||||||
&& cd unixodbc-*/ \
|
locale-gen && \
|
||||||
&& ./configure && make && make install \
|
echo "extension=sqlsrv.so" > /etc/php/7.1/cli/conf.d/20-sqlsrv.ini && \
|
||||||
&& cp -v ./exe/odbc_config /usr/local/bin/ && \
|
echo "extension=pdo_sqlsrv.so" > /etc/php/7.1/cli/conf.d/20-pdo_sqlsrv.ini \
|
||||||
|
|
||||||
# Fake uname for install.sh
|
|
||||||
printf '#!/bin/bash\nif [ "$*" == "-p" ]; then echo "x86_64"; else /bin/uname "$@"; fi' \
|
|
||||||
| tee /usr/local/bin/uname \
|
|
||||||
&& chmod +x /usr/local/bin/uname && \
|
|
||||||
|
|
||||||
# Microsoft ODBC Driver 13 for Linux
|
|
||||||
# Note: There's a copy of this tar on my hubiC
|
|
||||||
cd / && \
|
|
||||||
wget -nv -O msodbcsql-13.0.0.0.tar.gz \
|
|
||||||
"https://meetsstorenew.blob.core.windows.net/contianerhd/Ubuntu%2013.0%20Tar/msodbcsql-13.0.0.0.tar.gz?st=2016-10-18T17%3A29%3A00Z&se=2022-10-19T17%3A29%3A00Z&sp=rl&sv=2015-04-05&sr=b&sig=cDwPfrouVeIQf0vi%2BnKt%2BzX8Z8caIYvRCmicDL5oknY%3D" \
|
|
||||||
&& tar -xf msodbcsql-13.0.0.0.tar.gz \
|
|
||||||
&& cd msodbcsql-*/ \
|
|
||||||
&& ldd lib64/libmsodbcsql-13.0.so.0.0 \
|
|
||||||
&& ./install.sh install --accept-license \
|
|
||||||
&& ls -l /opt/microsoft/msodbcsql/ \
|
|
||||||
&& odbcinst -q -d -n "ODBC Driver 13 for SQL Server" && \
|
|
||||||
|
|
||||||
|
|
||||||
#####################################
|
|
||||||
# Install sqlsrv y pdo_sqlsrv
|
|
||||||
# extensions:
|
|
||||||
#####################################
|
|
||||||
|
|
||||||
pecl install sqlsrv-4.0.8 && \
|
|
||||||
pecl install pdo_sqlsrv-4.0.8 && \
|
|
||||||
|
|
||||||
#####################################
|
|
||||||
# Set locales for the container
|
|
||||||
#####################################
|
|
||||||
|
|
||||||
apt-get install -y locales \
|
|
||||||
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
|
|
||||||
&& locale-gen \
|
|
||||||
&& echo "extension=sqlsrv.so" > /etc/php/7.1/cli/conf.d/20-sqlsrv.ini \
|
|
||||||
&& echo "extension=pdo_sqlsrv.so" > /etc/php/7.1/cli/conf.d/20-pdo_sqlsrv.ini \
|
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
|
|
|
@ -539,76 +539,32 @@ ARG INSTALL_MSSQL=false
|
||||||
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
|
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
|
||||||
|
|
||||||
RUN if [ ${INSTALL_MSSQL} = true ]; then \
|
RUN if [ ${INSTALL_MSSQL} = true ]; then \
|
||||||
#####################################
|
|
||||||
# Install Depenencies:
|
|
||||||
#####################################
|
|
||||||
cd / && \
|
|
||||||
apt-get update -yqq && \
|
|
||||||
apt-get install -y --force-yes wget apt-transport-https curl freetds-common libsybdb5 freetds-bin unixodbc unixodbc-dev && \
|
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
# The following steps were taken from
|
# The following steps were taken from
|
||||||
# Microsoft's github account:
|
# https://github.com/Microsoft/msphpsql/wiki/Install-and-configuration
|
||||||
# https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-getting-pdo_sqlsrv-for-PHP-7.0-on-Debian-in-3-ways
|
|
||||||
#####################################
|
#####################################
|
||||||
|
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
|
||||||
# Add PHP 7 repository
|
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list && \
|
||||||
# for Debian jessie
|
apt-get update && \
|
||||||
# And System upgrade
|
ACCEPT_EULA=Y apt-get install -yqq msodbcsql=13.0.1.0-1 mssql-tools=14.0.2.0-1 && \
|
||||||
cd / && \
|
apt-get install -yqq unixodbc-dev-utf16 && \
|
||||||
echo "deb http://packages.dotdeb.org jessie all" \
|
ln -sfn /opt/mssql-tools/bin/sqlcmd-13.0.1.0 /usr/bin/sqlcmd && \
|
||||||
| tee /etc/apt/sources.list.d/dotdeb.list \
|
ln -sfn /opt/mssql-tools/bin/bcp-13.0.1.0 /usr/bin/bcp && \
|
||||||
&& wget -qO- https://www.dotdeb.org/dotdeb.gpg \
|
ACCEPT_EULA=Y apt-get install -yqq \
|
||||||
| apt-key add - \
|
unixodbc \
|
||||||
&& apt-get update -yqq \
|
unixodbc-dev \
|
||||||
&& apt-get upgrade -qq && \
|
libgss3 \
|
||||||
|
odbcinst \
|
||||||
# Install UnixODBC
|
msodbcsql \
|
||||||
# Compile odbc_config as it is not part of unixodbc package
|
locales && \
|
||||||
cd / && \
|
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
|
||||||
apt-get update -yqq && \
|
locale-gen && \
|
||||||
apt-get install -y whiptail \
|
pecl install sqlsrv-4.3.0 pdo_sqlsrv-4.3.0 && \
|
||||||
unixodbc libgss3 odbcinst devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev \
|
apt-get install -y locales && \
|
||||||
&& dget -u -x http://http.debian.net/debian/pool/main/u/unixodbc/unixodbc_2.3.1-3.dsc \
|
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
|
||||||
&& cd unixodbc-*/ \
|
locale-gen && \
|
||||||
&& ./configure && make && make install \
|
echo "extension=sqlsrv.so" > /etc/php/7.2/cli/conf.d/20-sqlsrv.ini && \
|
||||||
&& cp -v ./exe/odbc_config /usr/local/bin/ && \
|
echo "extension=pdo_sqlsrv.so" > /etc/php/7.2/cli/conf.d/20-pdo_sqlsrv.ini \
|
||||||
|
|
||||||
# Fake uname for install.sh
|
|
||||||
printf '#!/bin/bash\nif [ "$*" == "-p" ]; then echo "x86_64"; else /bin/uname "$@"; fi' \
|
|
||||||
| tee /usr/local/bin/uname \
|
|
||||||
&& chmod +x /usr/local/bin/uname && \
|
|
||||||
|
|
||||||
# Microsoft ODBC Driver 13 for Linux
|
|
||||||
# Note: There's a copy of this tar on my hubiC
|
|
||||||
cd / && \
|
|
||||||
wget -nv -O msodbcsql-13.0.0.0.tar.gz \
|
|
||||||
"https://meetsstorenew.blob.core.windows.net/contianerhd/Ubuntu%2013.0%20Tar/msodbcsql-13.0.0.0.tar.gz?st=2016-10-18T17%3A29%3A00Z&se=2022-10-19T17%3A29%3A00Z&sp=rl&sv=2015-04-05&sr=b&sig=cDwPfrouVeIQf0vi%2BnKt%2BzX8Z8caIYvRCmicDL5oknY%3D" \
|
|
||||||
&& tar -xf msodbcsql-13.0.0.0.tar.gz \
|
|
||||||
&& cd msodbcsql-*/ \
|
|
||||||
&& ldd lib64/libmsodbcsql-13.0.so.0.0 \
|
|
||||||
&& ./install.sh install --accept-license \
|
|
||||||
&& ls -l /opt/microsoft/msodbcsql/ \
|
|
||||||
&& odbcinst -q -d -n "ODBC Driver 13 for SQL Server" && \
|
|
||||||
|
|
||||||
|
|
||||||
#####################################
|
|
||||||
# Install sqlsrv y pdo_sqlsrv
|
|
||||||
# extensions:
|
|
||||||
#####################################
|
|
||||||
|
|
||||||
pecl install sqlsrv-4.0.8 && \
|
|
||||||
pecl install pdo_sqlsrv-4.0.8 && \
|
|
||||||
|
|
||||||
#####################################
|
|
||||||
# Set locales for the container
|
|
||||||
#####################################
|
|
||||||
|
|
||||||
apt-get install -y locales \
|
|
||||||
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
|
|
||||||
&& locale-gen \
|
|
||||||
&& echo "extension=sqlsrv.so" > /etc/php/7.2/cli/conf.d/20-sqlsrv.ini \
|
|
||||||
&& echo "extension=pdo_sqlsrv.so" > /etc/php/7.2/cli/conf.d/20-pdo_sqlsrv.ini \
|
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
|
|
Loading…
Reference in New Issue