Skip to content

Commit 4973dd9

Browse files
authored
Merge branch 'master' into master
2 parents d31ccbd + 9096737 commit 4973dd9

7 files changed

Lines changed: 92 additions & 8 deletions

File tree

env-example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ WORKSPACE_INSTALL_MC=false
2929
WORKSPACE_PUID=1000
3030
WORKSPACE_PGID=1000
3131
WORKSPACE_NODE_VERSION=stable
32+
WORKSPACE_YARN_VERSION=latest
3233
WORKSPACE_TIMEZONE=UTC
3334
WORKSPACE_SSH_PORT=2222
3435

mysql/startup

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
DROP USER IF EXISTS 'MYSQL_USER';
2-
CREATE USER 'MYSQL_USER'@'%';
3-
CREATE DATABASE IF NOT EXISTS MYSQL_DATABASE;
4-
GRANT ALL ON MYSQL_DATABASE.* TO 'MYSQL_USER'@'%' IDENTIFIED BY 'MYSQL_PASSWORD';
2+
CREATE USER 'MYSQL_USER'@'%' IDENTIFIED BY 'MYSQL_PASSWORD';
3+
CREATE DATABASE IF NOT EXISTS `MYSQL_DATABASE`;
4+
GRANT ALL ON `MYSQL_DATABASE`.* TO 'MYSQL_USER'@'%';

php-fpm/Dockerfile-70

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,79 @@ RUN if [ ${INSTALL_TOKENIZER} = true ]; then \
192192
docker-php-ext-install tokenizer \
193193
;fi
194194

195+
#####################################
196+
# SQL SERVER:
197+
#####################################
198+
ARG MSSQL=false
199+
RUN if [ ${MSSQL} = true ]; then \
200+
201+
#####################################
202+
# Install Depenencies:
203+
#####################################
204+
apt-get update && \
205+
apt-get install -y --force-yes wget apt-transport-https curl freetds-common php5-odbc libsybdb5 freetds-bin unixodbc unixodbc-dev php5-sybase && \
206+
207+
#####################################
208+
# The following steps were taken from
209+
# Microsoft's github account:
210+
# https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-getting-pdo_sqlsrv-for-PHP-7.0-on-Debian-in-3-ways
211+
#####################################
212+
213+
# Add PHP 7 repository
214+
# for Debian jessie
215+
# And System upgrade
216+
echo "deb http://packages.dotdeb.org jessie all" \
217+
| tee /etc/apt/sources.list.d/dotdeb.list \
218+
&& wget -qO- https://www.dotdeb.org/dotdeb.gpg \
219+
| apt-key add - \
220+
&& apt-get update \
221+
&& apt-get upgrade -qq && \
222+
223+
# Install UnixODBC
224+
# Compile odbc_config as it is not part of unixodbc package
225+
apt-get install -y whiptail \
226+
unixodbc libgss3 odbcinst devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev \
227+
&& dget -u -x http://http.debian.net/debian/pool/main/u/unixodbc/unixodbc_2.3.1-3.dsc \
228+
&& cd unixodbc-*/ \
229+
&& dpkg-buildpackage -uc -us -B -d \
230+
&& cp -v ./exe/odbc_config /usr/local/bin/ && \
231+
232+
# Fake uname for install.sh
233+
printf '#!/bin/bash\nif [ "$*" == "-p" ]; then echo "x86_64"; else /bin/uname "$@"; fi' \
234+
| tee /usr/local/bin/uname \
235+
&& chmod +x /usr/local/bin/uname && \
236+
237+
# Microsoft ODBC Driver 13 for Linux
238+
# Note: There's a copy of this tar on my hubiC
239+
wget -nv -O msodbcsql-13.0.0.0.tar.gz \
240+
"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" \
241+
&& tar -xf msodbcsql-13.0.0.0.tar.gz \
242+
&& cd msodbcsql-*/ \
243+
&& ldd lib64/libmsodbcsql-13.0.so.0.0 \
244+
&& ./install.sh install --accept-license \
245+
&& ls -l /opt/microsoft/msodbcsql/ \
246+
&& odbcinst -q -d -n "ODBC Driver 13 for SQL Server" && \
247+
248+
249+
#####################################
250+
# Install sqlsrv y pdo_sqlsrv
251+
# extensions:
252+
#####################################
253+
254+
pecl install sqlsrv-4.0.6 && \
255+
pecl install pdo_sqlsrv-4.0.6 && \
256+
257+
#####################################
258+
# Set locales for the container
259+
#####################################
260+
261+
apt-get install -y locales \
262+
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
263+
&& locale-gen \
264+
;fi
265+
266+
267+
195268
#####################################
196269
# Human Language and Character Encoding Support:
197270
#####################################
@@ -218,6 +291,7 @@ RUN if [ ${GHOSTSCRIPT} = true ]; then \
218291
ghostscript \
219292
;fi
220293

294+
221295
#
222296
#--------------------------------------------------------------------------
223297
# Final Touch

php-fpm/Dockerfile-71

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,19 @@ RUN if [ ${INSTALL_OPCACHE} = true ]; then \
130130
COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini
131131

132132
#####################################
133-
# Codeigniter Modifications:
133+
# Mysqli Modifications:
134+
#####################################
135+
ARG INSTALL_MYSQLI=false
136+
RUN if [ ${INSTALL_MYSQLI} = true ]; then \
137+
docker-php-ext-install mysqli \
138+
;fi
139+
140+
#####################################
141+
# Tokenizer Modifications:
134142
#####################################
135143

136-
ARG CODEIGNITER=false
137-
RUN if [ ${CODEIGNITER} = true ]; then \
138-
# Install Codeigniter PHP extentions requirements
139-
docker-php-ext-install mysqli && \
144+
ARG INSTALL_TOKENIZER=false
145+
RUN if [ ${INSTALL_TOKENIZER} = true ]; then \
140146
docker-php-ext-install tokenizer \
141147
;fi
142148

php-fpm/laravel.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ upload_max_filesize = 20M
1111
; Sets max size of post data allowed.
1212
; http://php.net/post-max-size
1313
post_max_size = 20M
14+
; Enables the MSSQL extensions
15+
extension=sqlsrv.so
16+
extension=pdo_sqlsrv.so

0 commit comments

Comments
 (0)