Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
laradock
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kerwin
laradock
Commits
43545cef
Commit
43545cef
authored
May 20, 2017
by
Shao Yu Lung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing PHP7.1 php-fpm mssql extension build failed
parent
71364f96
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
62 deletions
+12
-62
Dockerfile-71
php-fpm/Dockerfile-71
+12
-62
No files found.
php-fpm/Dockerfile-71
View file @
43545cef
...
@@ -267,76 +267,26 @@ RUN if [ ${INSTALL_LDAP} = true ]; then \
...
@@ -267,76 +267,26 @@ RUN if [ ${INSTALL_LDAP} = true ]; then \
#####################################
#####################################
# SQL SERVER:
# SQL SERVER:
#####################################
#####################################
ARG INSTALL_MSSQL=false
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:
# Ref from https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-adding-pdo_sqlsrv-and-sqlsrv-to-official-php-image
#####################################
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
# 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 Microsoft repo for Microsoft ODBC Driver 13 for Linux
# Add PHP 7 repository
apt-get update -yqq && apt-get install -y apt-transport-https \
# for Debian jessie
&& curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
# And System upgrade
&& curl https://packages.microsoft.com/config/debian/8/prod.list > /etc/apt/sources.list.d/mssql-release.list \
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 -yqq \
&& apt-get update -yqq \
&& apt-get upgrade -qq && \
# Install UnixODBC
# Compile odbc_config as it is not part of unixodbc package
apt-get update -yqq && \
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.0.8 && \
pecl install pdo_sqlsrv-4.0.8 && \
#
####################################
#
Install Dependencies
# Set locales for the container
&& ACCEPT_EULA=Y apt-get install -y unixodbc unixodbc-dev libgss3 odbcinst msodbcsql locales \
#####################################
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen \
apt-get install -y locales \
# Install pdo_sqlsrv and sqlsrv from PECL. Replace pdo_sqlsrv-4.1.8preview with preferred version.
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& pecl install pdo_sqlsrv-4.1.8preview sqlsrv-4.1.8preview \
&& locale-gen \
&& docker-php-ext-enable pdo_sqlsrv sqlsrv \
&& echo "extension=sqlsrv.so" > /usr/local/etc/php/conf.d/20-sqlsrv.ini \
&& echo "extension=pdo_sqlsrv.so" > /usr/local/etc/php/conf.d/20-pdo_sqlsrv.ini \
;fi
;fi
#
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment