Skip to content

Commit 100a2eb

Browse files
Merge pull request laradock#901 from bestlong/split-ci-build-job-each-service
Split Travis-CI build jobs and fix php-fpm mssql
2 parents 15d7cd1 + 59293d7 commit 100a2eb

6 files changed

Lines changed: 81 additions & 137 deletions

File tree

.travis.yml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,39 @@ services:
44
- docker
55

66
env:
7-
matrix:
8-
- PHP_VERSION=56
9-
- PHP_VERSION=70
10-
- PHP_VERSION=71
7+
matrix:
8+
- PHP_VERSION=56 BUILD_SERVICE="applications blackfire minio percona nginx caddy apache2 mysql mariadb phpmyadmin postgres postgres-postgis pgadmin neo4j mongo redis"
9+
- PHP_VERSION=70 BUILD_SERVICE="applications blackfire minio percona nginx caddy apache2 mysql mariadb phpmyadmin postgres postgres-postgis pgadmin neo4j mongo redis"
10+
- PHP_VERSION=71 BUILD_SERVICE="applications blackfire minio percona nginx caddy apache2 mysql mariadb phpmyadmin postgres postgres-postgis pgadmin neo4j mongo redis"
11+
12+
- PHP_VERSION=56 BUILD_SERVICE=workspace
13+
- PHP_VERSION=70 BUILD_SERVICE=workspace
14+
- PHP_VERSION=71 BUILD_SERVICE=workspace
15+
16+
- PHP_VERSION=56 BUILD_SERVICE=php-fpm
17+
- PHP_VERSION=70 BUILD_SERVICE=php-fpm
18+
- PHP_VERSION=71 BUILD_SERVICE=php-fpm
19+
20+
- PHP_VERSION=56 BUILD_SERVICE="php-worker hhvm"
21+
- PHP_VERSION=70 BUILD_SERVICE="php-worker hhvm"
22+
- PHP_VERSION=71 BUILD_SERVICE="php-worker hhvm"
23+
24+
- PHP_VERSION=56 BUILD_SERVICE=mssql
25+
- PHP_VERSION=70 BUILD_SERVICE=mssql
26+
- PHP_VERSION=71 BUILD_SERVICE=mssql
27+
28+
- PHP_VERSION=56 BUILD_SERVICE=rethinkdb
29+
- PHP_VERSION=70 BUILD_SERVICE=rethinkdb
30+
- PHP_VERSION=71 BUILD_SERVICE=rethinkdb
31+
32+
- PHP_VERSION=56 BUILD_SERVICE=aerospike
33+
- PHP_VERSION=70 BUILD_SERVICE=aerospike
34+
- PHP_VERSION=71 BUILD_SERVICE=aerospike
35+
36+
- PHP_VERSION=56 BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq adminer elasticsearch certbot mailhog selenium jenkins proxy proxy2 balancer"
37+
- PHP_VERSION=70 BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq adminer elasticsearch certbot mailhog selenium jenkins proxy proxy2 balancer"
38+
- PHP_VERSION=71 BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq adminer elasticsearch certbot mailhog selenium jenkins proxy proxy2 balancer"
39+
1140
- HUGO_VERSION=0.20.2
1241

1342
# Installing a newer Docker version

php-fpm/Dockerfile-70

Lines changed: 5 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -205,86 +205,6 @@ RUN if [ ${INSTALL_TOKENIZER} = true ]; then \
205205
docker-php-ext-install tokenizer \
206206
;fi
207207

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

376-
pecl install sqlsrv-4.1.7 && \
377-
pecl install pdo_sqlsrv-4.1.7 && \
296+
pecl install sqlsrv-4.0.8 && \
297+
pecl install pdo_sqlsrv-4.0.8 && \
378298

379299
#####################################
380300
# Set locales for the container
@@ -383,8 +303,8 @@ RUN if [ ${INSTALL_MSSQL} = true ]; then \
383303
apt-get install -y locales \
384304
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
385305
&& locale-gen \
386-
&& echo "extension=sqlsrv.so" > /etc/php/7.0/cli/conf.d/20-sqlsrv.ini \
387-
&& echo "extension=pdo_sqlsrv.so" > /etc/php/7.0/cli/conf.d/20-pdo_sqlsrv.ini \
306+
&& echo "extension=sqlsrv.so" > /usr/local/etc/php/conf.d/20-sqlsrv.ini \
307+
&& echo "extension=pdo_sqlsrv.so" > /usr/local/etc/php/conf.d/20-pdo_sqlsrv.ini \
388308
;fi
389309

390310
#
@@ -393,7 +313,7 @@ RUN if [ ${INSTALL_MSSQL} = true ]; then \
393313
#--------------------------------------------------------------------------
394314
#
395315

396-
ADD ./laravel.ini /usr/local/etc/php/conf.d
316+
ADD ./laravel.ini /usr/local/etc/php/conf.d/
397317
ADD ./laravel.pool.conf /usr/local/etc/php-fpm.d/
398318

399319
#RUN rm -r /var/lib/apt/lists/*

php-fpm/Dockerfile-71

Lines changed: 38 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -206,17 +206,44 @@ RUN if [ ${INSTALL_TOKENIZER} = true ]; then \
206206
;fi
207207

208208
#####################################
209-
# SQL SERVER:
209+
# Human Language and Character Encoding Support:
210+
#####################################
211+
212+
ARG INSTALL_INTL=false
213+
RUN if [ ${INSTALL_INTL} = true ]; then \
214+
# Install intl and requirements
215+
apt-get -y update && \
216+
apt-get install -y zlib1g-dev libicu-dev g++ && \
217+
docker-php-ext-configure intl && \
218+
docker-php-ext-install intl \
219+
;fi
220+
221+
#####################################
222+
# GHOSTSCRIPT:
210223
#####################################
211224

212-
ARG MSSQL=false
213-
RUN if [ ${MSSQL} = true ]; then \
225+
ARG INSTALL_GHOSTSCRIPT=false
226+
RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
227+
# Install the ghostscript extension
228+
# for PDF editing
229+
apt-get -y update \
230+
&& apt-get install -y \
231+
poppler-utils \
232+
ghostscript \
233+
;fi
214234

235+
#####################################
236+
# SQL SERVER:
237+
#####################################
238+
ARG INSTALL_MSSQL=false
239+
ENV INSTALL_MSSQL ${INSTALL_MSSQL}
240+
241+
RUN if [ ${INSTALL_MSSQL} = true ]; then \
215242
#####################################
216243
# Install Depenencies:
217244
#####################################
218245
apt-get update && \
219-
apt-get install -y --force-yes wget apt-transport-https curl freetds-common php5-odbc libsybdb5 freetds-bin unixodbc unixodbc-dev php5-sybase && \
246+
apt-get install -y --force-yes wget apt-transport-https curl freetds-common libsybdb5 freetds-bin unixodbc unixodbc-dev && \
220247

221248
#####################################
222249
# The following steps were taken from
@@ -236,11 +263,12 @@ RUN if [ ${MSSQL} = true ]; then \
236263

237264
# Install UnixODBC
238265
# Compile odbc_config as it is not part of unixodbc package
266+
apt-get update && \
239267
apt-get install -y whiptail \
240268
unixodbc libgss3 odbcinst devscripts debhelper dh-exec dh-autoreconf libreadline-dev libltdl-dev \
241269
&& dget -u -x http://http.debian.net/debian/pool/main/u/unixodbc/unixodbc_2.3.1-3.dsc \
242270
&& cd unixodbc-*/ \
243-
&& dpkg-buildpackage -uc -us -B -d \
271+
&& ./configure && make && make install \
244272
&& cp -v ./exe/odbc_config /usr/local/bin/ && \
245273

246274
# Fake uname for install.sh
@@ -257,24 +285,16 @@ RUN if [ ${MSSQL} = true ]; then \
257285
&& ldd lib64/libmsodbcsql-13.0.so.0.0 \
258286
&& ./install.sh install --accept-license \
259287
&& ls -l /opt/microsoft/msodbcsql/ \
260-
&& odbcinst -q -d -n "ODBC Driver 13 for SQL Server" \
288+
&& odbcinst -q -d -n "ODBC Driver 13 for SQL Server" && \
261289

262-
#####################################
263-
# Install pdo_dblib
264-
#####################################
265-
266-
&& docker-php-ext-install pdo \
267-
&& docker-php-ext-configure pdo_dblib --with-libdir=/lib/x86_64-linux-gnu \
268-
&& docker-php-ext-install pdo_dblib \
269-
&& docker-php-ext-enable pdo_dblib && \
270290

271291
#####################################
272292
# Install sqlsrv y pdo_sqlsrv
273293
# extensions:
274294
#####################################
275295

276-
pecl install sqlsrv-4.1.7preview && \
277-
pecl install pdo_sqlsrv-4.1.7preview && \
296+
pecl install sqlsrv-4.0.8 && \
297+
pecl install pdo_sqlsrv-4.0.8 && \
278298

279299
#####################################
280300
# Set locales for the container
@@ -283,33 +303,8 @@ RUN if [ ${MSSQL} = true ]; then \
283303
apt-get install -y locales \
284304
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
285305
&& locale-gen \
286-
;fi
287-
288-
#####################################
289-
# Human Language and Character Encoding Support:
290-
#####################################
291-
292-
ARG INSTALL_INTL=false
293-
RUN if [ ${INSTALL_INTL} = true ]; then \
294-
# Install intl and requirements
295-
apt-get -y update && \
296-
apt-get install -y zlib1g-dev libicu-dev g++ && \
297-
docker-php-ext-configure intl && \
298-
docker-php-ext-install intl \
299-
;fi
300-
301-
#####################################
302-
# GHOSTSCRIPT:
303-
#####################################
304-
305-
ARG INSTALL_GHOSTSCRIPT=false
306-
RUN if [ ${INSTALL_GHOSTSCRIPT} = true ]; then \
307-
# Install the ghostscript extension
308-
# for PDF editing
309-
apt-get -y update \
310-
&& apt-get install -y \
311-
poppler-utils \
312-
ghostscript \
306+
&& echo "extension=sqlsrv.so" > /usr/local/etc/php/conf.d/20-sqlsrv.ini \
307+
&& echo "extension=pdo_sqlsrv.so" > /usr/local/etc/php/conf.d/20-pdo_sqlsrv.ini \
313308
;fi
314309

315310
#

travis-build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if [ -n "${PHP_VERSION}" ]; then
1515
sed -i -- "s/PHP_VERSION=.*/PHP_VERSION=${PHP_VERSION}/g" .env
1616
sed -i -- 's/=false/=true/g' .env
1717
cat .env
18-
docker-compose build
18+
docker-compose build ${BUILD_SERVICE}
1919
docker images
2020
fi
2121

workspace/Dockerfile-70

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,8 +458,8 @@ RUN if [ ${INSTALL_MSSQL} = true ]; then \
458458
# extensions:
459459
#####################################
460460

461-
pecl install sqlsrv-4.0.6 && \
462-
pecl install pdo_sqlsrv-4.0.6 && \
461+
pecl install sqlsrv-4.0.8 && \
462+
pecl install pdo_sqlsrv-4.0.8 && \
463463

464464
#####################################
465465
# Set locales for the container

workspace/Dockerfile-71

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,8 @@ RUN if [ ${INSTALL_MSSQL} = true ]; then \
454454
# extensions:
455455
#####################################
456456

457-
pecl install sqlsrv-4.0.6 && \
458-
pecl install pdo_sqlsrv-4.0.6 && \
457+
pecl install sqlsrv-4.0.8 && \
458+
pecl install pdo_sqlsrv-4.0.8 && \
459459

460460
#####################################
461461
# Set locales for the container

0 commit comments

Comments
 (0)