diff --git a/DOCUMENTATION/content/documentation/index.md b/DOCUMENTATION/content/documentation/index.md index 745cf237..73e5990b 100644 --- a/DOCUMENTATION/content/documentation/index.md +++ b/DOCUMENTATION/content/documentation/index.md @@ -323,7 +323,7 @@ PHP_FPM_INSTALL_PHPDBG=true ## Setup remote debugging for PhpStorm on Linux - - Make sure you have followed the steps above in the [Install Xdebug section](http://laradock.io/documentation/#install-xdebug). + - Make sure you have followed the steps above in the [Install Xdebug section](#install-xdebug). - Make sure Xdebug accepts connections and listens on port 9000. (Should be default configuration). @@ -407,7 +407,7 @@ To learn more about how Docker publishes ports, please read [this excellent post ## Setup Laravel and Docker on Digital Ocean -### [Full Guide Here](https://github.com/laradock/laradock/blob/master/_guides/digital_ocean.md) +### [Full Guide Here](/guides/#Digital-Ocean) @@ -522,6 +522,7 @@ b) add a new service container by simply copy-paste this section below PHP-FPM c context: ./php-worker args: - INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL} #Optionally install PGSQL PHP drivers + - INSTALL_BCMATH=${PHP_WORKER_INSTALL_BCMATH} #Optionally install BCMath php package volumes_from: - applications depends_on: @@ -554,6 +555,19 @@ docker-compose up -d netdata 2 - Open your browser and visit the localhost on port **19999**: `http://localhost:19999` +
+ +## Use Metabase + +1 - Run the Metabase Container (`metbase`) with the `docker-compose up` command. Example: + +```bash +docker-compose up -d metabase +``` + +2 - Open your browser and visit the localhost on port **3030**: `http://localhost:3030` + +3 - You can use environment to configure Metabase container. See docs in: [Running Metabase on Docker](https://www.metabase.com/docs/v0.12.0/operations-guide/running-metabase-on-docker.html) @@ -1495,7 +1509,7 @@ e) set it to `true` ## PHPStorm Debugging Guide Remote debug Laravel web and phpunit tests. -[**Debugging Guide Here**](https://github.com/laradock/laradock/blob/master/_guides/phpstorm.md) +[**Debugging Guide Here**](/guides/#PHPStorm-Debugging) diff --git a/DOCUMENTATION/content/guides/index.md b/DOCUMENTATION/content/guides/index.md index 3cf1f38a..05c72a77 100644 --- a/DOCUMENTATION/content/guides/index.md +++ b/DOCUMENTATION/content/guides/index.md @@ -197,7 +197,7 @@ This is needed Prior to Creating Let's Encypt ## Run Your Caddy Container without the -d flag and Generate SSL with Let's Encrypt ``` -$root@server:~/laravel/laradock/caddy# docker-compose up caddy +$root@server:~/laravel/laradock# docker-compose up caddy ``` You'll be prompt here to enter your email... you may enter it or not @@ -218,8 +218,8 @@ After it finishes, press `Ctrl` + `C` to exit. ## Stop All Containers and ReRun Caddy and Other Containers on Background ``` -$root@server:~/laravel/laradock/caddy# docker-compose down -$root@server:~/laravel/laradock/caddy# docker-compose up -d mysql caddy +$root@server:~/laravel/laradock# docker-compose down +$root@server:~/laravel/laradock# docker-compose up -d mysql caddy ``` View your Site in the Browser Securely Using HTTPS (https://yourdomain.com) diff --git a/docker-compose.yml b/docker-compose.yml index 8b2cbd13..958e8bd0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -47,7 +47,7 @@ services: build: context: ./workspace args: - - PHP_VERSION=${PHP_VERSION} + - LARADOCK_PHP_VERSION=${PHP_VERSION} - INSTALL_SUBVERSION=${WORKSPACE_INSTALL_SUBVERSION} - INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG} - INSTALL_PHPDBG=${WORKSPACE_INSTALL_PHPDBG} @@ -116,7 +116,7 @@ services: build: context: ./php-fpm args: - - PHP_VERSION=${PHP_VERSION} + - LARADOCK_PHP_VERSION=${PHP_VERSION} - INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG} - INSTALL_PHPDBG=${PHP_FPM_INSTALL_PHPDBG} - INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE} @@ -169,6 +169,7 @@ services: args: - PHP_VERSION=${PHP_VERSION} - INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL} + - INSTALL_BCMATH=${PHP_WORKER_INSTALL_BCMATH} volumes: - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER} - ./php-worker/supervisord.d:/etc/supervisord.d @@ -876,3 +877,16 @@ services: - backend depends_on: - mongo + +### Metabase ################################################# + metabase: + image: metabase/metabase:latest + environment: + - MB_DB_FILE=/metabase-data/${METABASE_DB_FILE} + ports: + - ${METABASE_PORT}:3000 + volumes: + - ${DATA_PATH_HOST}/metabase-data:/metabase-data + networks: + - backend + diff --git a/env-example b/env-example index 5832e9b0..7777d578 100644 --- a/env-example +++ b/env-example @@ -154,6 +154,7 @@ PHP_FPM_INSTALL_CALENDAR=false ### PHP_WORKER ############################################ PHP_WORKER_INSTALL_PGSQL=false +PHP_WORKER_INSTALL_BCMATH=false ### NGINX ################################################# @@ -336,6 +337,8 @@ AEROSPIKE_INFO_PORT=3003 # for all versions "https://github.com/aerospike/aerospike-client-php/archive/master.tar.gz" # for php 7.2 (using this branch until the support for 7.2 on master) "https://github.com/aerospike/aerospike-client-php/archive/7.2.0-release-candidate.tar.gz" AEROSPIKE_PHP_REPOSITORY=https://github.com/aerospike/aerospike-client-php/archive/7.2.0-release-candidate.tar.gz +# for php 5.6 +# AEROSPIKE_PHP_REPOSITORY=https://github.com/aerospike/aerospike-client-php5/archive/3.4.15.tar.gz ### RETHINKDB ############################################# @@ -402,3 +405,8 @@ MONGO_WEBUI_PORT=3000 MONGO_WEBUI_ROOT_URL=http://localhost MONGO_WEBUI_MONGO_URL=mongodb://mongo:27017/ MONGO_WEBUI_INSTALL_MONGO=false + +### METABASE ############################################### +METABASE_PORT=3030 +METABASE_DB_FILE=metabase.db +METABASE_JAVA_TIMEZONE=US/Pacific diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 8a76ab75..2fb86df8 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -12,12 +12,14 @@ # Note: Base Image name format {image-tag}-{php-version} # -ARG PHP_VERSION=${PHP_VERSION} +ARG LARADOCK_PHP_VERSION -FROM laradock/php-fpm:2.2-${PHP_VERSION} +FROM laradock/php-fpm:2.2-${LARADOCK_PHP_VERSION} LABEL maintainer="Mahmoud Zalt " +ARG LARADOCK_PHP_VERSION + # Set Environment Variables ENV DEBIAN_FRONTEND noninteractive @@ -114,11 +116,10 @@ RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /usr/local/e ########################################################################### ARG INSTALL_PHPDBG=false -ARG PHP_VERSION=${PHP_VERSION} RUN if [ ${INSTALL_PHPDBG} = true ]; then \ # Load the xdebug extension only with phpunit commands - apt-get install -y --force-yes php${PHP_VERSION}-phpdbg \ + apt-get install -y --force-yes php${LARADOCK_PHP_VERSION}-phpdbg \ ;fi ########################################################################### @@ -416,14 +417,16 @@ RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \ # Add Microsoft repo for Microsoft ODBC Driver 13 for Linux apt-get install -y apt-transport-https gnupg \ && curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \ - && curl https://packages.microsoft.com/config/debian/8/prod.list > /etc/apt/sources.list.d/mssql-release.list \ + && curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list \ && apt-get update -yqq \ # Install Dependencies - && ACCEPT_EULA=Y apt-get install -y unixodbc unixodbc-dev libgss3 odbcinst msodbcsql locales \ + && ACCEPT_EULA=Y apt-get install -y unixodbc unixodbc-dev libgss3 odbcinst msodbcsql17 locales \ && echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \ + # link local aliases + && ln -sfn /etc/locale.alias /usr/share/locale/locale.alias \ && locale-gen \ # Install pdo_sqlsrv and sqlsrv from PECL. Replace pdo_sqlsrv-4.1.8preview with preferred version. - && pecl install pdo_sqlsrv-4.1.8preview sqlsrv-4.1.8preview \ + && pecl install pdo_sqlsrv sqlsrv \ && docker-php-ext-enable pdo_sqlsrv sqlsrv \ && php -m | grep -q 'pdo_sqlsrv' \ && php -m | grep -q 'sqlsrv' \ @@ -486,9 +489,7 @@ RUN if [ ${INSTALL_CALENDAR} = true ]; then \ # Check PHP version: ########################################################################### -ARG PHP_VERSION=${PHP_VERSION} - -RUN php -v | head -n 1 | grep -q "PHP ${PHP_VERSION}." +RUN php -v | head -n 1 | grep -q "PHP ${LARADOCK_PHP_VERSION}." # #-------------------------------------------------------------------------- diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index 158a1664..d7c677d3 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -25,6 +25,12 @@ RUN apk --update add wget \ RUN docker-php-ext-install mysqli mbstring pdo pdo_mysql tokenizer xml pcntl RUN pecl channel-update pecl.php.net && pecl install memcached mcrypt-1.0.1 && docker-php-ext-enable memcached +#Install BCMath package: +ARG INSTALL_BCMATH=false +RUN if [ ${INSTALL_BCMATH} = true ]; then \ + docker-php-ext-install bcmath \ +;fi + # Install PostgreSQL drivers: ARG INSTALL_PGSQL=false RUN if [ ${INSTALL_PGSQL} = true ]; then \ diff --git a/travis-build.sh b/travis-build.sh index c72f51df..eeee67ba 100755 --- a/travis-build.sh +++ b/travis-build.sh @@ -14,6 +14,11 @@ if [ -n "${PHP_VERSION}" ]; then cp env-example .env sed -i -- "s/PHP_VERSION=.*/PHP_VERSION=${PHP_VERSION}/g" .env sed -i -- 's/=false/=true/g' .env + sed -i -- 's/PHPDBG=true/PHPDBG=false/g' .env + if [ "${PHP_VERSION}" == "5.6" ]; then + sed -i -- 's/^AEROSPIKE_PHP_REPOSITORY=/##AEROSPIKE_PHP_REPOSITORY=/g' .env + sed -i -- 's/^# AEROSPIKE_PHP_REPOSITORY=/AEROSPIKE_PHP_REPOSITORY=/g' .env + fi cat .env docker-compose build ${BUILD_SERVICE} docker images diff --git a/varnish/default.vcl b/varnish/default.vcl index 155a863a..73099c39 100644 --- a/varnish/default.vcl +++ b/varnish/default.vcl @@ -266,7 +266,7 @@ sub vcl_hit { return (deliver); } else { # No candidate for grace. Fetch a fresh object. - return(fetch); + return(miss); } } else { # backend is sick - use full grace @@ -275,12 +275,12 @@ sub vcl_hit { return (deliver); } else { # no graced object. - return (fetch); + return (miss); } } # fetch & deliver once we get the result - return (fetch); # Dead code, keep as a safeguard + return (miss); # Dead code, keep as a safeguard } sub vcl_miss { diff --git a/varnish/start.sh b/varnish/start.sh index e14511a9..7e7c28a5 100644 --- a/varnish/start.sh +++ b/varnish/start.sh @@ -11,7 +11,7 @@ exec bash -c \ "exec varnishd \ -a :$VARNISH_PORT \ -T localhost:6082 \ - -F -u varnish \ + -F \ -f $VARNISH_CONFIG \ -s malloc,$CACHE_SIZE \ - $VARNISHD_PARAMS" \ No newline at end of file + $VARNISHD_PARAMS" diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 36e44375..52dc1691 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -12,12 +12,14 @@ # Note: Base Image name format {image-tag}-{php-version} # -ARG PHP_VERSION=${PHP_VERSION} +ARG LARADOCK_PHP_VERSION -FROM laradock/workspace:2.2-${PHP_VERSION} +FROM laradock/workspace:2.2-${LARADOCK_PHP_VERSION} LABEL maintainer="Mahmoud Zalt " +ARG LARADOCK_PHP_VERSION + # Set Environment Variables ENV DEBIAN_FRONTEND noninteractive @@ -179,11 +181,10 @@ RUN if [ ${INSTALL_DRUSH} = true ]; then \ USER root ARG INSTALL_SOAP=false -ARG PHP_VERSION=${PHP_VERSION} RUN if [ ${INSTALL_SOAP} = true ]; then \ # Install the PHP SOAP extension - apt-get -y install libxml2-dev php${PHP_VERSION}-soap \ + apt-get -y install libxml2-dev php${LARADOCK_PHP_VERSION}-soap \ ;fi ########################################################################### @@ -191,11 +192,10 @@ RUN if [ ${INSTALL_SOAP} = true ]; then \ ########################################################################### ARG INSTALL_LDAP=false -ARG PHP_VERSION=${PHP_VERSION} RUN if [ ${INSTALL_LDAP} = true ]; then \ apt-get install -y libldap2-dev && \ - apt-get install -y php${PHP_VERSION}-ldap \ + apt-get install -y php${LARADOCK_PHP_VERSION}-ldap \ ;fi ########################################################################### @@ -203,10 +203,9 @@ RUN if [ ${INSTALL_LDAP} = true ]; then \ ########################################################################### ARG INSTALL_IMAP=false -ARG PHP_VERSION=${PHP_VERSION} RUN if [ ${INSTALL_IMAP} = true ]; then \ - apt-get install -y php${PHP_VERSION}-imap \ + apt-get install -y php${LARADOCK_PHP_VERSION}-imap \ ;fi ########################################################################### @@ -229,21 +228,20 @@ RUN if [ ${INSTALL_SUBVERSION} = true ]; then \ USER root ARG INSTALL_XDEBUG=false -ARG PHP_VERSION=${PHP_VERSION} RUN if [ ${INSTALL_XDEBUG} = true ]; then \ # Load the xdebug extension only with phpunit commands - apt-get install -y php${PHP_VERSION}-xdebug && \ - sed -i 's/^;//g' /etc/php/${PHP_VERSION}/cli/conf.d/20-xdebug.ini && \ + apt-get install -y php${LARADOCK_PHP_VERSION}-xdebug && \ + sed -i 's/^;//g' /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-xdebug.ini && \ echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \ ;fi # ADD for REMOTE debugging -COPY ./xdebug.ini /etc/php/${PHP_VERSION}/cli/conf.d/xdebug.ini +COPY ./xdebug.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini -RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /etc/php/${PHP_VERSION}/cli/conf.d/xdebug.ini && \ - sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /etc/php/${PHP_VERSION}/cli/conf.d/xdebug.ini && \ - sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /etc/php/${PHP_VERSION}/cli/conf.d/xdebug.ini +RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini && \ + sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini && \ + sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/xdebug.ini ########################################################################### # Phpdbg: @@ -252,11 +250,10 @@ RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /etc/php/${P USER root ARG INSTALL_PHPDBG=false -ARG PHP_VERSION=${PHP_VERSION} RUN if [ ${INSTALL_PHPDBG} = true ]; then \ # Load the xdebug extension only with phpunit commands - apt-get install -y --force-yes php${PHP_VERSION}-phpdbg \ + apt-get install -y --force-yes php${LARADOCK_PHP_VERSION}-phpdbg \ ;fi ########################################################################### @@ -302,18 +299,17 @@ RUN if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \ ########################################################################### ARG INSTALL_MONGO=false -ARG PHP_VERSION=${PHP_VERSION} RUN if [ ${INSTALL_MONGO} = true ]; then \ # Install the mongodb extension if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ pecl install mongo && \ - echo "extension=mongo.so" >> /etc/php/${PHP_VERSION}/mods-available/mongo.ini && \ - ln -s /etc/php/${PHP_VERSION}/mods-available/mongo.ini /etc/php/${PHP_VERSION}/cli/conf.d/30-mongo.ini \ + echo "extension=mongo.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongo.ini && \ + ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongo.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-mongo.ini \ ;fi && \ pecl install mongodb && \ - echo "extension=mongodb.so" >> /etc/php/${PHP_VERSION}/mods-available/mongodb.ini && \ - ln -s /etc/php/${PHP_VERSION}/mods-available/mongodb.ini /etc/php/${PHP_VERSION}/cli/conf.d/30-mongodb.ini \ + echo "extension=mongodb.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongodb.ini && \ + ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/mongodb.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-mongodb.ini \ ;fi ########################################################################### @@ -321,13 +317,12 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \ ########################################################################### ARG INSTALL_AMQP=false -ARG PHP_VERSION=${PHP_VERSION} RUN if [ ${INSTALL_AMQP} = true ]; then \ apt-get install librabbitmq-dev -y && \ pecl -q install amqp && \ - echo "extension=amqp.so" >> /etc/php/${PHP_VERSION}/mods-available/amqp.ini && \ - ln -s /etc/php/${PHP_VERSION}/mods-available/amqp.ini /etc/php/${PHP_VERSION}/cli/conf.d/30-amqp.ini \ + echo "extension=amqp.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/amqp.ini && \ + ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/amqp.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-amqp.ini \ ;fi ########################################################################### @@ -335,12 +330,11 @@ RUN if [ ${INSTALL_AMQP} = true ]; then \ ########################################################################### ARG INSTALL_PHPREDIS=false -ARG PHP_VERSION=${PHP_VERSION} RUN if [ ${INSTALL_PHPREDIS} = true ]; then \ # Install Php Redis extension printf "\n" | pecl -q install -o -f redis && \ - echo "extension=redis.so" >> /etc/php/${PHP_VERSION}/mods-available/redis.ini && \ + echo "extension=redis.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/redis.ini && \ phpenmod redis \ ;fi @@ -349,7 +343,6 @@ RUN if [ ${INSTALL_PHPREDIS} = true ]; then \ ########################################################################### ARG INSTALL_SWOOLE=false -ARG PHP_VERSION=${PHP_VERSION} RUN if [ ${INSTALL_SWOOLE} = true ]; then \ # Install Php Swoole Extension @@ -362,8 +355,8 @@ RUN if [ ${INSTALL_SWOOLE} = true ]; then \ pecl install swoole; \ fi \ fi && \ - echo "extension=swoole.so" >> /etc/php/${PHP_VERSION}/mods-available/swoole.ini && \ - ln -s /etc/php/${PHP_VERSION}/mods-available/swoole.ini /etc/php/${PHP_VERSION}/cli/conf.d/20-swoole.ini \ + echo "extension=swoole.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/swoole.ini && \ + ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/swoole.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-swoole.ini \ ;fi ########################################################################### @@ -502,7 +495,6 @@ RUN if [ ${INSTALL_YARN} = true ]; then \ USER root ARG INSTALL_AEROSPIKE=false -ARG PHP_VERSION=${PHP_VERSION} ARG AEROSPIKE_PHP_REPOSITORY RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \ @@ -512,16 +504,26 @@ RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \ curl -L -o /tmp/aerospike-client-php.tar.gz ${AEROSPIKE_PHP_REPOSITORY} \ && mkdir -p aerospike-client-php \ && tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \ - && ( \ - cd aerospike-client-php/src \ - && phpize \ - && ./build.sh \ - && make install \ - ) \ + && \ + if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ + ( \ + cd aerospike-client-php/src/aerospike \ + && phpize \ + && ./build.sh \ + && make install \ + ) \ + else \ + ( \ + cd aerospike-client-php/src \ + && phpize \ + && ./build.sh \ + && make install \ + ) \ + fi \ && rm /tmp/aerospike-client-php.tar.gz \ - && echo 'extension=aerospike.so' >> /etc/php/${PHP_VERSION}/cli/conf.d/aerospike.ini \ - && echo 'aerospike.udf.lua_system_path=/usr/local/aerospike/lua' >> /etc/php/${PHP_VERSION}/cli/conf.d/aerospike.ini \ - && echo 'aerospike.udf.lua_user_path=/usr/local/aerospike/usr-lua' >> /etc/php/${PHP_VERSION}/cli/conf.d/aerospike.ini \ + && echo 'extension=aerospike.so' >> /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/aerospike.ini \ + && echo 'aerospike.udf.lua_system_path=/usr/local/aerospike/lua' >> /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/aerospike.ini \ + && echo 'aerospike.udf.lua_user_path=/usr/local/aerospike/usr-lua' >> /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/aerospike.ini \ ;fi ########################################################################### @@ -531,15 +533,14 @@ RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \ USER root ARG INSTALL_V8JS=false -ARG PHP_VERSION=${PHP_VERSION} RUN if [ ${INSTALL_V8JS} = true ]; then \ # Install the php V8JS extension add-apt-repository -y ppa:pinepain/libv8-archived \ && apt-get update -yqq \ - && apt-get install -y php${PHP_VERSION}-xml php${PHP_VERSION}-dev php-pear libv8-5.4 \ + && apt-get install -y php${LARADOCK_PHP_VERSION}-xml php${LARADOCK_PHP_VERSION}-dev php-pear libv8-5.4 \ && pecl install v8js \ - && echo "extension=v8js.so" >> /etc/php/${PHP_VERSION}/cli/php.ini \ + && echo "extension=v8js.so" >> /etc/php/${LARADOCK_PHP_VERSION}/cli/php.ini \ ;fi ########################################################################### @@ -637,7 +638,6 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \ ########################################################################### ARG INSTALL_MSSQL=false -ARG PHP_VERSION=${PHP_VERSION} RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ @@ -652,25 +652,14 @@ RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \ curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \ curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list && \ apt-get update -yqq && \ - ACCEPT_EULA=Y apt-get install -yqq msodbcsql=13.0.1.0-1 mssql-tools=14.0.2.0-1 && \ - apt-get install -yqq unixodbc-dev-utf16 && \ - ln -sfn /opt/mssql-tools/bin/sqlcmd-13.0.1.0 /usr/bin/sqlcmd && \ - ln -sfn /opt/mssql-tools/bin/bcp-13.0.1.0 /usr/bin/bcp && \ - ACCEPT_EULA=Y apt-get install -yqq \ - unixodbc \ - unixodbc-dev \ - libgss3 \ - odbcinst \ - msodbcsql \ - locales && \ + ACCEPT_EULA=Y apt-get install -y msodbcsql17 mssql-tools unixodbc unixodbc-dev libgss3 odbcinst locales && \ + ln -sfn /opt/mssql-tools/bin/sqlcmd /usr/bin/sqlcmd && \ + ln -sfn /opt/mssql-tools/bin/bcp /usr/bin/bcp && \ echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \ locale-gen && \ - pecl install sqlsrv-4.3.0 pdo_sqlsrv-4.3.0 && \ - apt-get install -y locales && \ - echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \ - locale-gen && \ - echo "extension=sqlsrv.so" > /etc/php/${PHP_VERSION}/cli/conf.d/20-sqlsrv.ini && \ - echo "extension=pdo_sqlsrv.so" > /etc/php/${PHP_VERSION}/cli/conf.d/20-pdo_sqlsrv.ini \ + pecl install sqlsrv pdo_sqlsrv && \ + echo "extension=sqlsrv.so" > /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-sqlsrv.ini && \ + echo "extension=pdo_sqlsrv.so" > /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/20-pdo_sqlsrv.ini \ && php -m | grep -q 'sqlsrv' \ && php -m | grep -q 'pdo_sqlsrv' \ ;fi \ @@ -777,7 +766,11 @@ ARG INSTALL_PG_CLIENT=false RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \ # Install the pgsql client - apt-get -y install postgresql-client \ + apt-get install wget \ + && add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" \ + && wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \ + && apt-get update \ + && apt-get -y install postgresql-client-10 \ ;fi ########################################################################### @@ -819,9 +812,7 @@ RUN if [ ${INSTALL_DUSK_DEPS} = true ]; then \ # Check PHP version: ########################################################################### -ARG PHP_VERSION=${PHP_VERSION} - -RUN php -v | head -n 1 | grep -q "PHP ${PHP_VERSION}." +RUN php -v | head -n 1 | grep -q "PHP ${LARADOCK_PHP_VERSION}." # #--------------------------------------------------------------------------