From fde406bafa4c421c4bf752c37dba1f2c20051bd6 Mon Sep 17 00:00:00 2001 From: Shao Yu Lung Date: Fri, 5 May 2017 12:33:09 +0800 Subject: [PATCH 1/2] Dockerfile-71 fill missing MSSQL section --- workspace/Dockerfile-71 | 79 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/workspace/Dockerfile-71 b/workspace/Dockerfile-71 index 0ced70c9..537404d0 100644 --- a/workspace/Dockerfile-71 +++ b/workspace/Dockerfile-71 @@ -389,6 +389,85 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \ echo 'export LD_LIBRARY_PATH="$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH"' >> ~/.bashrc \ ;fi +##################################### +# SQL SERVER: +##################################### +ARG INSTALL_MSSQL=true +ENV INSTALL_MSSQL ${INSTALL_MSSQL} + +RUN if [ ${INSTALL_MSSQL} = true ]; then \ + ##################################### + # Install Depenencies: + ##################################### + cd / && \ + apt-get update && \ + 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 + # Microsoft's github account: + # https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-getting-pdo_sqlsrv-for-PHP-7.0-on-Debian-in-3-ways + ##################################### + + # Add PHP 7 repository + # for Debian jessie + # And System upgrade + cd / && \ + echo "deb http://packages.dotdeb.org jessie all" \ + | tee /etc/apt/sources.list.d/dotdeb.list \ + && wget -qO- https://www.dotdeb.org/dotdeb.gpg \ + | apt-key add - \ + && apt-get update \ + && apt-get upgrade -qq && \ + + # Install UnixODBC + # Compile odbc_config as it is not part of unixodbc package + cd / && \ + apt-get update && \ + apt-get install -y whiptail \ + unixodbc libgss3 odbcinst devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev \ + && dget -u -x http://http.debian.net/debian/pool/main/u/unixodbc/unixodbc_2.3.1-3.dsc \ + && cd unixodbc-*/ \ + && ./configure && make && make install \ + && cp -v ./exe/odbc_config /usr/local/bin/ && \ + + # 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.6 && \ + pecl install pdo_sqlsrv-4.0.6 && \ + + ##################################### + # 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 + ##################################### # Minio: ##################################### From e579b18794395a0dd67577b677c3b04a5dd494d5 Mon Sep 17 00:00:00 2001 From: Shao Yu Lung Date: Fri, 5 May 2017 13:07:56 +0800 Subject: [PATCH 2/2] workspace/Dockerfile-70 duplicate MSSQL section. --- workspace/Dockerfile-70 | 77 ----------------------------------------- 1 file changed, 77 deletions(-) diff --git a/workspace/Dockerfile-70 b/workspace/Dockerfile-70 index 49d36922..ddd36ccb 100644 --- a/workspace/Dockerfile-70 +++ b/workspace/Dockerfile-70 @@ -508,83 +508,6 @@ RUN if [ ${INSTALL_SYMFONY} = true ]; then \ ;fi -##################################### -# SQL SERVER: -##################################### -ARG INSTALL_MSSQL=false -ENV INSTALL_MSSQL ${INSTALL_MSSQL} - -RUN if [ ${INSTALL_MSSQL} = true ]; then \ - ##################################### - # Install Depenencies: - ##################################### - apt-get update && \ - 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 - # Microsoft's github account: - # https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-getting-pdo_sqlsrv-for-PHP-7.0-on-Debian-in-3-ways - ##################################### - - # Add PHP 7 repository - # for Debian jessie - # And System upgrade - echo "deb http://packages.dotdeb.org jessie all" \ - | tee /etc/apt/sources.list.d/dotdeb.list \ - && wget -qO- https://www.dotdeb.org/dotdeb.gpg \ - | apt-key add - \ - && apt-get update \ - && apt-get upgrade -qq && \ - - # Install UnixODBC - # Compile odbc_config as it is not part of unixodbc package - apt-get update && \ - apt-get install -y whiptail \ - unixodbc libgss3 odbcinst devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev \ - && dget -u -x http://http.debian.net/debian/pool/main/u/unixodbc/unixodbc_2.3.1-3.dsc \ - && cd unixodbc-*/ \ - && ./configure && make && make install \ - && cp -v ./exe/odbc_config /usr/local/bin/ && \ - - # 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 - 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.1.7 && \ - pecl install pdo_sqlsrv-4.1.7 && \ - - ##################################### - # 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 - -USER laradock - # #-------------------------------------------------------------------------- # Final Touch