diff --git a/DOCUMENTATION/content/documentation/index.md b/DOCUMENTATION/content/documentation/index.md index be16c0b..3532084 100644 --- a/DOCUMENTATION/content/documentation/index.md +++ b/DOCUMENTATION/content/documentation/index.md @@ -1094,7 +1094,18 @@ To change the default forwarded port for ssh: ... ``` +Then login using: +```bash +ssh -o PasswordAuthentication=no \ + -o StrictHostKeyChecking=no \ + -o UserKnownHostsFile=/dev/null \ + -p 2222 \ + -i workspace/insecure_id_rsa \ + laradock@localhost +``` + +To login as root, replace laradock@locahost with root@localhost.
diff --git a/DOCUMENTATION/content/getting-started/index.md b/DOCUMENTATION/content/getting-started/index.md index 4d088ac..095b9ae 100644 --- a/DOCUMENTATION/content/getting-started/index.md +++ b/DOCUMENTATION/content/getting-started/index.md @@ -176,7 +176,7 @@ docker-compose up -d nginx mysql **Note**: The `workspace` and `php-fpm` will run automatically in most of the cases, so no need to specify them in the `up` command. If you couldn't find them running then you need specify them as follow: `docker-compose up -d nginx php-fpm mysql workspace`. -You can select your own combination of containers form [this list](http://laradock.io/introduction/#supported-software-images). +You can select your own combination of containers from [this list](http://laradock.io/introduction/#supported-software-images). *(Please note that sometimes we forget to update the docs, so check the `docker-compose.yml` file to see an updated list of all available containers).* diff --git a/aerospike/Dockerfile b/aerospike/Dockerfile index e4a6e27..a85bc20 100644 --- a/aerospike/Dockerfile +++ b/aerospike/Dockerfile @@ -4,4 +4,4 @@ LABEL maintainer="Luciano Jr " RUN rm /etc/aerospike/aerospike.conf -ADD aerospike.conf /etc/aerospike/aerospike.conf +COPY aerospike.conf /etc/aerospike/aerospike.conf diff --git a/apache2/Dockerfile b/apache2/Dockerfile index d15d008..71cad50 100644 --- a/apache2/Dockerfile +++ b/apache2/Dockerfile @@ -5,10 +5,11 @@ LABEL maintainer="Eric Pfeiffer " ARG PHP_UPSTREAM_CONTAINER=php-fpm ARG PHP_UPSTREAM_PORT=9000 ARG PHP_UPSTREAM_TIMEOUT=60 +ARG DOCUMENT_ROOT=/var/www/ ENV WEB_PHP_SOCKET=${PHP_UPSTREAM_CONTAINER}:${PHP_UPSTREAM_PORT} -ENV WEB_DOCUMENT_ROOT=/var/www/ +ENV WEB_DOCUMENT_ROOT=${DOCUMENT_ROOT} ENV WEB_PHP_TIMEOUT=${PHP_UPSTREAM_TIMEOUT} diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index ed1e80f..45567e1 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -6,4 +6,4 @@ services: applications: volumes: - - ${APPLICATION}:/var/www + - ${APPLICATION}:/var/www:cached diff --git a/docker-compose.yml b/docker-compose.yml index 923a330..fcfd55a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -125,6 +125,8 @@ services: - INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL} volumes_from: - applications + volumes: + - ./php-worker/supervisord.d:/etc/supervisord.d depends_on: - workspace extra_hosts: @@ -175,6 +177,7 @@ services: - PHP_UPSTREAM_CONTAINER=${APACHE_PHP_UPSTREAM_CONTAINER} - PHP_UPSTREAM_PORT=${APACHE_PHP_UPSTREAM_PORT} - PHP_UPSTREAM_TIMEOUT=${APACHE_PHP_UPSTREAM_TIMEOUT} + - DOCUMENT_ROOT=${APACHE_DOCUMENT_ROOT} volumes_from: - applications volumes: @@ -296,7 +299,7 @@ services: postgres: build: ./postgres volumes: - - ${DATA_SAVE_PATH}/postgres:/var/lib/postgresql + - ${DATA_SAVE_PATH}/postgres:/var/lib/postgresql/data ports: - "${POSTGRES_PORT}:5432" environment: @@ -509,7 +512,6 @@ services: build: ./elasticsearch volumes: - elasticsearch-data:/usr/share/elasticsearch/data - - elasticsearch-plugins:/usr/share/elasticsearch/plugins environment: - cluster.name=laradock-cluster - bootstrap.memory_lock=true @@ -749,5 +751,3 @@ volumes: driver: "local" elasticsearch-data: driver: "local" - elasticsearch-plugins: - driver: "local" diff --git a/elasticsearch/Dockerfile b/elasticsearch/Dockerfile index 914761e..c82bd0c 100644 --- a/elasticsearch/Dockerfile +++ b/elasticsearch/Dockerfile @@ -1,3 +1,3 @@ -FROM docker.elastic.co/elasticsearch/elasticsearch:5.4.1 +FROM docker.elastic.co/elasticsearch/elasticsearch:6.2.3 EXPOSE 9200 9300 diff --git a/env-example b/env-example index 7be68b2..12ed88a 100644 --- a/env-example +++ b/env-example @@ -147,6 +147,7 @@ APACHE_SITES_PATH=./apache2/sites APACHE_PHP_UPSTREAM_CONTAINER=php-fpm APACHE_PHP_UPSTREAM_PORT=9000 APACHE_PHP_UPSTREAM_TIMEOUT=60 +APACHE_DOCUMENT_ROOT=/var/www/ ### MYSQL ############################################################################################################## diff --git a/hhvm/Dockerfile b/hhvm/Dockerfile index 1b10cde..e1b1f62 100644 --- a/hhvm/Dockerfile +++ b/hhvm/Dockerfile @@ -15,7 +15,7 @@ RUN apt-get update -y \ RUN mkdir -p /var/www -ADD server.ini /etc/hhvm/server.ini +COPY server.ini /etc/hhvm/server.ini RUN usermod -u 1000 www-data diff --git a/mariadb/Dockerfile b/mariadb/Dockerfile index 05b984f..0dcb948 100644 --- a/mariadb/Dockerfile +++ b/mariadb/Dockerfile @@ -2,7 +2,7 @@ FROM mariadb:latest LABEL maintainer="Mahmoud Zalt " -ADD my.cnf /etc/mysql/conf.d/my.cnf +COPY my.cnf /etc/mysql/conf.d/my.cnf CMD ["mysqld"] diff --git a/mysql/Dockerfile b/mysql/Dockerfile index c2811d5..a3de886 100644 --- a/mysql/Dockerfile +++ b/mysql/Dockerfile @@ -13,7 +13,7 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN chown -R mysql:root /var/lib/mysql/ -ADD my.cnf /etc/mysql/conf.d/my.cnf +COPY my.cnf /etc/mysql/conf.d/my.cnf CMD ["mysqld"] diff --git a/nginx/Dockerfile b/nginx/Dockerfile index 5be2554..7af74fc 100644 --- a/nginx/Dockerfile +++ b/nginx/Dockerfile @@ -2,7 +2,7 @@ FROM nginx:alpine LABEL maintainer="Mahmoud Zalt " -ADD nginx.conf /etc/nginx/ +COPY nginx.conf /etc/nginx/ # If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env. diff --git a/nginx/sites/symfony.conf.example b/nginx/sites/symfony.conf.example index 6796715..acb0aad 100644 --- a/nginx/sites/symfony.conf.example +++ b/nginx/sites/symfony.conf.example @@ -11,11 +11,17 @@ server { try_files $uri @rewriteapp; } + # For Symfony 3 location @rewriteapp { rewrite ^(.*)$ /app.php/$1 last; } + + # For Symfony 4 config + # location @rewriteapp { + # rewrite ^(.*)$ /index.php/$1 last; + # } - location ~ ^/(app|app_dev|config)\.php(/|$) { + location ~ ^/(app|app_dev|config|index)\.php(/|$) { fastcgi_pass php-upstream; fastcgi_split_path_info ^(.+\.php)(/.*)$; include fastcgi_params; diff --git a/percona/Dockerfile b/percona/Dockerfile index 9a8b5c6..3d3fd6d 100644 --- a/percona/Dockerfile +++ b/percona/Dockerfile @@ -4,7 +4,7 @@ LABEL maintainer="DTUNES " RUN chown -R mysql:root /var/lib/mysql/ -ADD my.cnf /etc/mysql/conf.d/my.cnf +COPY my.cnf /etc/mysql/conf.d/my.cnf CMD ["mysqld"] diff --git a/php-fpm/Dockerfile-56 b/php-fpm/Dockerfile-56 index 93bc0ba..01dbf7c 100644 --- a/php-fpm/Dockerfile-56 +++ b/php-fpm/Dockerfile-56 @@ -206,14 +206,17 @@ RUN if [ ${INSTALL_EXIF} = true ]; then \ ##################################### # PHP Aerospike: ##################################### +USER root ARG INSTALL_AEROSPIKE=false ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE} -# Copy aerospike configration for remote debugging -COPY ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini + RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \ + # Fix dependencies for PHPUnit within aerospike extension + apt-get update -yqq && \ + apt-get -y install sudo wget && \ # Install the php aerospike extension - curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php5/archive/3.4.15.tar.gz" \ + curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php5/archive/master.tar.gz" \ && mkdir -p aerospike-client-php \ && tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \ && ( \ @@ -299,11 +302,11 @@ RUN if [ ${INSTALL_LDAP} = true ]; then \ ##################################### ARG INSTALL_MSSQL=false ENV INSTALL_MSSQL ${INSTALL_MSSQL} - -RUN if [ ${INSTALL_MSSQL} = true ]; then \ - apt-get -y install php5-sybase freetds-bin && \ - cp /usr/lib/php5/20131226/*.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/ && \ - docker-php-ext-enable mssql pdo pdo_dblib \ +RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \ + apt-get -y install php5-sybase freetds-bin \ + && cp /usr/lib/php5/20131226/*.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/ \ + && docker-php-ext-enable pdo_dblib mssql \ + && php -m | grep -q 'mssql' \ ;fi ##################################### @@ -355,8 +358,8 @@ RUN php -v | head -n 1 | grep -q "PHP 5.6." #-------------------------------------------------------------------------- # -ADD ./laravel.ini /usr/local/etc/php/conf.d -ADD ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/ +COPY ./laravel.ini /usr/local/etc/php/conf.d +COPY ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/ #RUN rm -r /var/lib/apt/lists/* diff --git a/php-fpm/Dockerfile-70 b/php-fpm/Dockerfile-70 index f0dfb44..a533727 100644 --- a/php-fpm/Dockerfile-70 +++ b/php-fpm/Dockerfile-70 @@ -213,12 +213,15 @@ RUN if [ ${INSTALL_EXIF} = true ]; then \ ##################################### # PHP Aerospike: ##################################### +USER root ARG INSTALL_AEROSPIKE=false ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE} -# Copy aerospike configration for remote debugging -COPY ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini + RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \ + # Fix dependencies for PHPUnit within aerospike extension + apt-get update -yqq && \ + apt-get -y install sudo wget && \ # Install the php aerospike extension curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/master.tar.gz" \ && mkdir -p aerospike-client-php \ @@ -305,26 +308,27 @@ RUN if [ ${INSTALL_LDAP} = true ]; then \ ##################################### # SQL SERVER: ##################################### - ARG INSTALL_MSSQL=false ENV INSTALL_MSSQL ${INSTALL_MSSQL} -RUN if [ ${INSTALL_MSSQL} = true ]; then \ +RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \ ##################################### # Ref from https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-adding-pdo_sqlsrv-and-sqlsrv-to-official-php-image ##################################### # Add Microsoft repo for Microsoft ODBC Driver 13 for Linux apt-get update -yqq \ - && apt-get install -y apt-transport-https \ - && 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 \ - && apt-get update -yqq \ + && apt-get install -y apt-transport-https \ + && 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 \ + && apt-get update -yqq \ # Install Dependencies - && 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 \ + && 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 \ # 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 \ - && docker-php-ext-enable pdo_sqlsrv sqlsrv \ + && pecl install pdo_sqlsrv-4.1.8preview sqlsrv-4.1.8preview \ + && docker-php-ext-enable pdo_sqlsrv sqlsrv \ + && php -m | grep -q 'pdo_sqlsrv' \ + && php -m | grep -q 'sqlsrv' \ ;fi ##################################### @@ -376,8 +380,8 @@ RUN php -v | head -n 1 | grep -q "PHP 7.0." #-------------------------------------------------------------------------- # -ADD ./laravel.ini /usr/local/etc/php/conf.d/ -ADD ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/ +COPY ./laravel.ini /usr/local/etc/php/conf.d/ +COPY ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/ #RUN rm -r /var/lib/apt/lists/* diff --git a/php-fpm/Dockerfile-71 b/php-fpm/Dockerfile-71 index 13c6001..7b84785 100644 --- a/php-fpm/Dockerfile-71 +++ b/php-fpm/Dockerfile-71 @@ -213,13 +213,11 @@ RUN if [ ${INSTALL_EXIF} = true ]; then \ ##################################### # PHP Aerospike: ##################################### +USER root ARG INSTALL_AEROSPIKE=false ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE} -# Copy aerospike configration for remote debugging -COPY ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini - RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \ # Fix dependencies for PHPUnit within aerospike extension apt-get update -yqq && \ @@ -235,10 +233,7 @@ RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \ && make install \ ) \ && rm /tmp/aerospike-client-php.tar.gz \ -;fi - -RUN if [ ${INSTALL_AEROSPIKE} = false ]; then \ - rm /usr/local/etc/php/conf.d/aerospike.ini \ + && docker-php-ext-enable aerospike \ ;fi ##################################### @@ -313,24 +308,27 @@ RUN if [ ${INSTALL_LDAP} = true ]; then \ ##################################### # SQL SERVER: ##################################### - ARG INSTALL_MSSQL=false ENV INSTALL_MSSQL ${INSTALL_MSSQL} -RUN if [ ${INSTALL_MSSQL} = true ]; then \ +RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \ ##################################### # Ref from https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-adding-pdo_sqlsrv-and-sqlsrv-to-official-php-image ##################################### # Add Microsoft repo for Microsoft ODBC Driver 13 for Linux - apt-get update -yqq && apt-get install -y apt-transport-https \ - && 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 \ - && apt-get update -yqq \ + apt-get update -yqq \ + && apt-get install -y apt-transport-https \ + && 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 \ + && apt-get update -yqq \ # Install Dependencies - && 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 \ + && 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 \ # 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 \ - && docker-php-ext-enable pdo_sqlsrv sqlsrv \ + && pecl install pdo_sqlsrv-4.1.8preview sqlsrv-4.1.8preview \ + && docker-php-ext-enable pdo_sqlsrv sqlsrv \ + && php -m | grep -q 'pdo_sqlsrv' \ + && php -m | grep -q 'sqlsrv' \ ;fi ##################################### @@ -382,8 +380,8 @@ RUN php -v | head -n 1 | grep -q "PHP 7.1." #-------------------------------------------------------------------------- # -ADD ./laravel.ini /usr/local/etc/php/conf.d -ADD ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/ +COPY ./laravel.ini /usr/local/etc/php/conf.d +COPY ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/ #RUN rm -r /var/lib/apt/lists/* diff --git a/php-fpm/Dockerfile-72 b/php-fpm/Dockerfile-72 index 0a372a2..0d34a9a 100644 --- a/php-fpm/Dockerfile-72 +++ b/php-fpm/Dockerfile-72 @@ -216,18 +216,15 @@ RUN if [ ${INSTALL_EXIF} = true ]; then \ ##################################### # PHP Aerospike: ##################################### +USER root ARG INSTALL_AEROSPIKE=false ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE} -# Copy aerospike configration for remote debugging -COPY ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini - RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \ # Fix dependencies for PHPUnit within aerospike extension apt-get update -yqq && \ apt-get -y install sudo wget && \ - # Install the php aerospike extension (using 7.2.0-in-progress branch until support for 7.2 on master) curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/7.2.0-in-progress.tar.gz" \ && mkdir -p aerospike-client-php \ @@ -239,10 +236,7 @@ RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \ && make install \ ) \ && rm /tmp/aerospike-client-php.tar.gz \ -;fi - -RUN if [ ${INSTALL_AEROSPIKE} = false ]; then \ - rm /usr/local/etc/php/conf.d/aerospike.ini \ + && docker-php-ext-enable aerospike \ ;fi ##################################### @@ -317,26 +311,27 @@ RUN if [ ${INSTALL_LDAP} = true ]; then \ ##################################### # SQL SERVER: ##################################### - ARG INSTALL_MSSQL=false ENV INSTALL_MSSQL ${INSTALL_MSSQL} -RUN if [ ${INSTALL_MSSQL} = true ]; then \ +RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \ ##################################### # Ref from https://github.com/Microsoft/msphpsql/wiki/Dockerfile-for-adding-pdo_sqlsrv-and-sqlsrv-to-official-php-image ##################################### # Add Microsoft repo for Microsoft ODBC Driver 13 for Linux - apt-get update -yqq && 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 \ - && apt-get update -yqq \ - + apt-get update -yqq \ + && 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 \ + && apt-get update -yqq \ # Install Dependencies - && 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 \ - + && 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 \ # 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 \ - && docker-php-ext-enable pdo_sqlsrv sqlsrv \ + && pecl install pdo_sqlsrv-4.1.8preview sqlsrv-4.1.8preview \ + && docker-php-ext-enable pdo_sqlsrv sqlsrv \ + && php -m | grep -q 'pdo_sqlsrv' \ + && php -m | grep -q 'sqlsrv' \ ;fi ##################################### @@ -388,8 +383,8 @@ RUN php -v | head -n 1 | grep -q "PHP 7.2." #-------------------------------------------------------------------------- # -ADD ./laravel.ini /usr/local/etc/php/conf.d -ADD ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/ +COPY ./laravel.ini /usr/local/etc/php/conf.d +COPY ./xlaravel.pool.conf /usr/local/etc/php-fpm.d/ #RUN rm -r /var/lib/apt/lists/* diff --git a/php-worker/supervisord.conf b/php-worker/supervisord.conf index d0a2ece..203f014 100644 --- a/php-worker/supervisord.conf +++ b/php-worker/supervisord.conf @@ -6,10 +6,5 @@ port = 127.0.0.1:9001 [rpcinterface:supervisor] supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface -[program:laravel-worker] -process_name=%(program_name)s_%(process_num)02d -command=php /var/www/artisan queue:work --sleep=3 --tries=3 --daemon -autostart=true -autorestart=true -numprocs=8 -redirect_stderr=true +[include] +files = supervisord.d/*.conf \ No newline at end of file diff --git a/php-worker/supervisord.d/laravel-worker.conf b/php-worker/supervisord.d/laravel-worker.conf new file mode 100644 index 0000000..cce9e92 --- /dev/null +++ b/php-worker/supervisord.d/laravel-worker.conf @@ -0,0 +1,7 @@ +[program:laravel-worker] +process_name=%(program_name)s_%(process_num)02d +command=php /var/www/artisan queue:work --sleep=3 --tries=3 --daemon +autostart=true +autorestart=true +numprocs=8 +redirect_stderr=true \ No newline at end of file diff --git a/varnish/Dockerfile b/varnish/Dockerfile index 5da88e1..8cc4fbf 100644 --- a/varnish/Dockerfile +++ b/varnish/Dockerfile @@ -19,8 +19,8 @@ ENV VARNISH_PORT 6081 ENV BACKEND_HOST localhost ENV BACKEND_PORT 80 -ADD default.vcl /etc/varnish/default.vcl -ADD start.sh /etc/varnish/start.sh +COPY default.vcl /etc/varnish/default.vcl +COPY start.sh /etc/varnish/start.sh RUN chmod +x /etc/varnish/start.sh diff --git a/workspace/Dockerfile-56 b/workspace/Dockerfile-56 index d021f8e..8608323 100644 --- a/workspace/Dockerfile-56 +++ b/workspace/Dockerfile-56 @@ -55,7 +55,7 @@ ENV PGID ${PGID} RUN groupadd -g ${PGID} laradock && \ useradd -u ${PUID} -g laradock -m laradock -G docker_env && \ - apt-get update -yqq + usermod -p "*" laradock ##################################### # SOAP: @@ -151,14 +151,23 @@ RUN chmod -R 644 /etc/cron.d ##################################### USER root +COPY ./aliases.sh /root/aliases.sh COPY ./aliases.sh /home/laradock/aliases.sh + +RUN sed -i 's/\r//' /root/aliases.sh && \ + sed -i 's/\r//' /home/laradock/aliases.sh && \ + chown laradock:laradock /home/laradock/aliases.sh && \ + echo "" >> ~/.bashrc && \ + echo "# Load Custom Aliases" >> ~/.bashrc && \ + echo "source ~/aliases.sh" >> ~/.bashrc && \ + echo "" >> ~/.bashrc + +USER laradock + RUN echo "" >> ~/.bashrc && \ echo "# Load Custom Aliases" >> ~/.bashrc && \ - echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \ - echo "" >> ~/.bashrc && \ - sed -i 's/\r//' /home/laradock/aliases.sh && \ - sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh && \ - chown laradock:laradock /home/laradock/aliases.sh + echo "source ~/aliases.sh" >> ~/.bashrc && \ + echo "" >> ~/.bashrc ##################################### # xDebug: @@ -199,8 +208,8 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \ ARG INSTALL_WORKSPACE_SSH=false ENV INSTALL_WORKSPACE_SSH ${INSTALL_WORKSPACE_SSH} -ADD insecure_id_rsa /tmp/id_rsa -ADD insecure_id_rsa.pub /tmp/id_rsa.pub +COPY insecure_id_rsa /tmp/id_rsa +COPY insecure_id_rsa.pub /tmp/id_rsa.pub RUN if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \ rm -f /etc/service/sshd/down && \ @@ -384,15 +393,15 @@ RUN if [ ${INSTALL_YARN} = true ]; then \ ##################################### USER root -ARG INSTALL_AEROSPIKE=true +ARG INSTALL_AEROSPIKE=false ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE} -# Copy aerospike configration for remote debugging -COPY ./aerospike.ini /etc/php/5.6/cli/conf.d/aerospike.ini - RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \ + # Fix dependencies for PHPUnit within aerospike extension + apt-get update -yqq && \ + apt-get -y install sudo wget && \ # Install the php aerospike extension - curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php5/archive/3.4.15.tar.gz" \ + curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php5/archive/master.tar.gz" \ && mkdir -p aerospike-client-php \ && tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \ && ( \ @@ -402,10 +411,9 @@ RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \ && make install \ ) \ && rm /tmp/aerospike-client-php.tar.gz \ -;fi - -RUN if [ ${INSTALL_AEROSPIKE} = false ]; then \ - rm /etc/php/5.6/cli/conf.d/aerospike.ini \ + && echo 'extension=aerospike.so' >> /etc/php/5.6/cli/conf.d/aerospike.ini \ + && echo 'aerospike.udf.lua_system_path=/usr/local/aerospike/lua' >> /etc/php/5.6/cli/conf.d/aerospike.ini \ + && echo 'aerospike.udf.lua_user_path=/usr/local/aerospike/usr-lua' >> /etc/php/5.6/cli/conf.d/aerospike.ini \ ;fi ##################################### @@ -440,7 +448,7 @@ RUN echo "" >> ~/.bashrc && \ ##################################### USER laradock -ARG INSTALL_LARAVEL_ENVOY=true +ARG INSTALL_LARAVEL_ENVOY=false ENV INSTALL_LARAVEL_ENVOY ${INSTALL_LARAVEL_ENVOY} RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \ @@ -460,7 +468,7 @@ RUN if [ ${COMPOSER_REPO_PACKAGIST} ]; then \ composer config -g repo.packagist composer ${COMPOSER_REPO_PACKAGIST} \ ;fi -ARG INSTALL_LARAVEL_INSTALLER=true +ARG INSTALL_LARAVEL_INSTALLER=false ENV INSTALL_LARAVEL_INSTALLER ${INSTALL_LARAVEL_INSTALLER} RUN if [ ${INSTALL_LARAVEL_INSTALLER} = true ]; then \ @@ -507,7 +515,6 @@ ARG INSTALL_LINUXBREW=true ENV INSTALL_LINUXBREW ${INSTALL_LINUXBREW} RUN if [ ${INSTALL_LINUXBREW} = true ]; then \ - # Preparation apt-get upgrade -y && \ apt-get install -y build-essential make cmake scons curl git \ @@ -515,13 +522,10 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \ gettext libtool flex bison \ libbz2-dev libcurl4-openssl-dev \ libexpat-dev libncurses-dev && \ - # Install the Linuxbrew git clone --depth=1 https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew && \ - echo "" >> ~/.bashrc && \ echo 'export PKG_CONFIG_PATH"=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.bashrc && \ - # Setup linuxbrew echo 'export LINUXBREWHOME="$HOME/.linuxbrew"' >> ~/.bashrc && \ echo 'export PATH="$LINUXBREWHOME/bin:$PATH"' >> ~/.bashrc && \ @@ -536,9 +540,12 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \ ARG INSTALL_MSSQL=false ENV INSTALL_MSSQL ${INSTALL_MSSQL} -RUN if [ ${INSTALL_MSSQL} = true ]; then \ +RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \ apt-get -y install php5.6-sybase freetds-bin freetds-common libsybdb5 \ + && echo "extension=mssql.so" > /etc/php/5.6/cli/conf.d/20-mssql.ini \ && echo "extension=pdo_dblib.so" > /etc/php/5.6/cli/conf.d/20-pdo_dblib.ini \ + && php -m | grep -q 'mssql' \ + && php -m | grep -q 'pdo_dblib' \ ;fi ##################################### @@ -577,19 +584,15 @@ USER root ARG INSTALL_SYMFONY=false ENV INSTALL_SYMFONY ${INSTALL_SYMFONY} RUN if [ ${INSTALL_SYMFONY} = true ]; then \ - mkdir -p /usr/local/bin \ && curl -LsS https://symfony.com/installer -o /usr/local/bin/symfony \ && chmod a+x /usr/local/bin/symfony \ - # Symfony 3 alias && echo 'alias dev="php bin/console -e=dev"' >> ~/.bashrc \ && echo 'alias prod="php bin/console -e=prod"' >> ~/.bashrc \ - # Symfony 2 alias # && echo 'alias dev="php app/console -e=dev"' >> ~/.bashrc \ # && echo 'alias prod="php app/console -e=prod"' >> ~/.bashrc \ - ;fi ##################################### diff --git a/workspace/Dockerfile-70 b/workspace/Dockerfile-70 index b198ddf..2d9e9e0 100644 --- a/workspace/Dockerfile-70 +++ b/workspace/Dockerfile-70 @@ -55,7 +55,7 @@ ENV PGID ${PGID} RUN groupadd -g ${PGID} laradock && \ useradd -u ${PUID} -g laradock -m laradock -G docker_env && \ - apt-get update -yqq + usermod -p "*" laradock ##################################### # SOAP: @@ -148,14 +148,23 @@ RUN chmod -R 644 /etc/cron.d ##################################### USER root +COPY ./aliases.sh /root/aliases.sh COPY ./aliases.sh /home/laradock/aliases.sh + +RUN sed -i 's/\r//' /root/aliases.sh && \ + sed -i 's/\r//' /home/laradock/aliases.sh && \ + chown laradock:laradock /home/laradock/aliases.sh && \ + echo "" >> ~/.bashrc && \ + echo "# Load Custom Aliases" >> ~/.bashrc && \ + echo "source ~/aliases.sh" >> ~/.bashrc && \ + echo "" >> ~/.bashrc + +USER laradock + RUN echo "" >> ~/.bashrc && \ echo "# Load Custom Aliases" >> ~/.bashrc && \ - echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \ - echo "" >> ~/.bashrc && \ - sed -i 's/\r//' /home/laradock/aliases.sh && \ - sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh && \ - chown laradock:laradock /home/laradock/aliases.sh + echo "source ~/aliases.sh" >> ~/.bashrc && \ + echo "" >> ~/.bashrc ##################################### # xDebug: @@ -196,8 +205,8 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \ ARG INSTALL_WORKSPACE_SSH=false ENV INSTALL_WORKSPACE_SSH ${INSTALL_WORKSPACE_SSH} -ADD insecure_id_rsa /tmp/id_rsa -ADD insecure_id_rsa.pub /tmp/id_rsa.pub +COPY insecure_id_rsa /tmp/id_rsa +COPY insecure_id_rsa.pub /tmp/id_rsa.pub RUN if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \ rm -f /etc/service/sshd/down && \ @@ -380,13 +389,13 @@ RUN if [ ${INSTALL_YARN} = true ]; then \ ##################################### USER root -ARG INSTALL_AEROSPIKE=true +ARG INSTALL_AEROSPIKE=false ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE} -# Copy aerospike configration for remote debugging -COPY ./aerospike.ini /etc/php/7.0/cli/conf.d/aerospike.ini - RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \ + # Fix dependencies for PHPUnit within aerospike extension + apt-get update -yqq && \ + apt-get -y install sudo wget && \ # Install the php aerospike extension curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/master.tar.gz" \ && mkdir -p aerospike-client-php \ @@ -398,10 +407,9 @@ RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \ && make install \ ) \ && rm /tmp/aerospike-client-php.tar.gz \ -;fi - -RUN if [ ${INSTALL_AEROSPIKE} = false ]; then \ - rm /etc/php/7.0/cli/conf.d/aerospike.ini \ + && echo 'extension=aerospike.so' >> /etc/php/7.0/cli/conf.d/aerospike.ini \ + && echo 'aerospike.udf.lua_system_path=/usr/local/aerospike/lua' >> /etc/php/7.0/cli/conf.d/aerospike.ini \ + && echo 'aerospike.udf.lua_user_path=/usr/local/aerospike/usr-lua' >> /etc/php/7.0/cli/conf.d/aerospike.ini \ ;fi ##################################### @@ -436,7 +444,7 @@ RUN echo "" >> ~/.bashrc && \ ##################################### USER laradock -ARG INSTALL_LARAVEL_ENVOY=true +ARG INSTALL_LARAVEL_ENVOY=false ENV INSTALL_LARAVEL_ENVOY ${INSTALL_LARAVEL_ENVOY} RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \ @@ -456,7 +464,7 @@ RUN if [ ${COMPOSER_REPO_PACKAGIST} ]; then \ composer config -g repo.packagist composer ${COMPOSER_REPO_PACKAGIST} \ ;fi -ARG INSTALL_LARAVEL_INSTALLER=true +ARG INSTALL_LARAVEL_INSTALLER=false ENV INSTALL_LARAVEL_INSTALLER ${INSTALL_LARAVEL_INSTALLER} RUN if [ ${INSTALL_LARAVEL_INSTALLER} = true ]; then \ @@ -503,7 +511,6 @@ ARG INSTALL_LINUXBREW=true ENV INSTALL_LINUXBREW ${INSTALL_LINUXBREW} RUN if [ ${INSTALL_LINUXBREW} = true ]; then \ - # Preparation apt-get upgrade -y && \ apt-get install -y build-essential make cmake scons curl git \ @@ -511,13 +518,10 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \ gettext libtool flex bison \ libbz2-dev libcurl4-openssl-dev \ libexpat-dev libncurses-dev && \ - # Install the Linuxbrew git clone --depth=1 https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew && \ - echo "" >> ~/.bashrc && \ echo 'export PKG_CONFIG_PATH"=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.bashrc && \ - # Setup linuxbrew echo 'export LINUXBREWHOME="$HOME/.linuxbrew"' >> ~/.bashrc && \ echo 'export PATH="$LINUXBREWHOME/bin:$PATH"' >> ~/.bashrc && \ @@ -532,7 +536,7 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \ ARG INSTALL_MSSQL=true ENV INSTALL_MSSQL ${INSTALL_MSSQL} -RUN if [ ${INSTALL_MSSQL} = true ]; then \ +RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \ ##################################### # The following steps were taken from # https://github.com/Microsoft/msphpsql/wiki/Install-and-configuration @@ -559,6 +563,8 @@ RUN if [ ${INSTALL_MSSQL} = true ]; then \ 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 \ + && php -m | grep -q 'sqlsrv' \ + && php -m | grep -q 'pdo_sqlsrv' \ ;fi ##################################### @@ -595,19 +601,15 @@ USER root ARG INSTALL_SYMFONY=false ENV INSTALL_SYMFONY ${INSTALL_SYMFONY} RUN if [ ${INSTALL_SYMFONY} = true ]; then \ - mkdir -p /usr/local/bin \ && curl -LsS https://symfony.com/installer -o /usr/local/bin/symfony \ && chmod a+x /usr/local/bin/symfony \ - # Symfony 3 alias && echo 'alias dev="php bin/console -e=dev"' >> ~/.bashrc \ && echo 'alias prod="php bin/console -e=prod"' >> ~/.bashrc \ - # Symfony 2 alias # && echo 'alias dev="php app/console -e=dev"' >> ~/.bashrc \ # && echo 'alias prod="php app/console -e=prod"' >> ~/.bashrc \ - ;fi ##################################### diff --git a/workspace/Dockerfile-71 b/workspace/Dockerfile-71 index 514d5b6..ddc81eb 100644 --- a/workspace/Dockerfile-71 +++ b/workspace/Dockerfile-71 @@ -55,6 +55,7 @@ ENV PGID ${PGID} RUN groupadd -g ${PGID} laradock && \ useradd -u ${PUID} -g laradock -m laradock -G docker_env + usermod -p "*" laradock ##################################### # SOAP: @@ -143,14 +144,23 @@ RUN chmod -R 644 /etc/cron.d ##################################### USER root +COPY ./aliases.sh /root/aliases.sh COPY ./aliases.sh /home/laradock/aliases.sh + +RUN sed -i 's/\r//' /root/aliases.sh && \ + sed -i 's/\r//' /home/laradock/aliases.sh && \ + chown laradock:laradock /home/laradock/aliases.sh && \ + echo "" >> ~/.bashrc && \ + echo "# Load Custom Aliases" >> ~/.bashrc && \ + echo "source ~/aliases.sh" >> ~/.bashrc && \ + echo "" >> ~/.bashrc + +USER laradock + RUN echo "" >> ~/.bashrc && \ echo "# Load Custom Aliases" >> ~/.bashrc && \ - echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \ - echo "" >> ~/.bashrc && \ - sed -i 's/\r//' /home/laradock/aliases.sh && \ - sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh && \ - chown laradock:laradock /home/laradock/aliases.sh + echo "source ~/aliases.sh" >> ~/.bashrc && \ + echo "" >> ~/.bashrc ##################################### # xDebug: @@ -192,8 +202,8 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \ ARG INSTALL_WORKSPACE_SSH=false ENV INSTALL_WORKSPACE_SSH ${INSTALL_WORKSPACE_SSH} -ADD insecure_id_rsa /tmp/id_rsa -ADD insecure_id_rsa.pub /tmp/id_rsa.pub +COPY insecure_id_rsa /tmp/id_rsa +COPY insecure_id_rsa.pub /tmp/id_rsa.pub RUN if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \ rm -f /etc/service/sshd/down && \ @@ -379,14 +389,10 @@ USER root ARG INSTALL_AEROSPIKE=false ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE} -# Copy aerospike configration for remote debugging -COPY ./aerospike.ini /etc/php/7.1/cli/conf.d/aerospike.ini - RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \ # Fix dependencies for PHPUnit within aerospike extension apt-get update -yqq && \ apt-get -y install sudo wget && \ - # Install the php aerospike extension curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/master.tar.gz" \ && mkdir -p aerospike-client-php \ @@ -398,10 +404,9 @@ RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \ && make install \ ) \ && rm /tmp/aerospike-client-php.tar.gz \ -;fi - -RUN if [ ${INSTALL_AEROSPIKE} = false ]; then \ - rm /etc/php/7.1/cli/conf.d/aerospike.ini \ + && echo 'extension=aerospike.so' >> /etc/php/7.1/cli/conf.d/aerospike.ini \ + && echo 'aerospike.udf.lua_system_path=/usr/local/aerospike/lua' >> /etc/php/7.1/cli/conf.d/aerospike.ini \ + && echo 'aerospike.udf.lua_user_path=/usr/local/aerospike/usr-lua' >> /etc/php/7.1/cli/conf.d/aerospike.ini \ ;fi ##################################### @@ -434,11 +439,6 @@ RUN echo "" >> ~/.bashrc && \ ##################################### # Laravel Envoy: ##################################### -USER root - -RUN apt-get update -yqq \ - && apt-get install -y php-curl - USER laradock ARG INSTALL_LARAVEL_ENVOY=false @@ -512,7 +512,6 @@ ARG INSTALL_LINUXBREW=false ENV INSTALL_LINUXBREW ${INSTALL_LINUXBREW} RUN if [ ${INSTALL_LINUXBREW} = true ]; then \ - # Preparation apt-get upgrade -y && \ apt-get install -y build-essential make cmake scons curl git \ @@ -520,13 +519,10 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \ gettext libtool flex bison \ libbz2-dev libcurl4-openssl-dev \ libexpat-dev libncurses-dev && \ - # Install the Linuxbrew git clone --depth=1 https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew && \ - echo "" >> ~/.bashrc && \ echo 'export PKG_CONFIG_PATH"=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.bashrc && \ - # Setup linuxbrew echo 'export LINUXBREWHOME="$HOME/.linuxbrew"' >> ~/.bashrc && \ echo 'export PATH="$LINUXBREWHOME/bin:$PATH"' >> ~/.bashrc && \ @@ -541,7 +537,7 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \ ARG INSTALL_MSSQL=false ENV INSTALL_MSSQL ${INSTALL_MSSQL} -RUN if [ ${INSTALL_MSSQL} = true ]; then \ +RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \ ##################################### # The following steps were taken from # https://github.com/Microsoft/msphpsql/wiki/Install-and-configuration @@ -568,6 +564,8 @@ RUN if [ ${INSTALL_MSSQL} = true ]; then \ 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 \ + && php -m | grep -q 'sqlsrv' \ + && php -m | grep -q 'pdo_sqlsrv' \ ;fi ##################################### @@ -606,19 +604,15 @@ USER root ARG INSTALL_SYMFONY=false ENV INSTALL_SYMFONY ${INSTALL_SYMFONY} RUN if [ ${INSTALL_SYMFONY} = true ]; then \ - mkdir -p /usr/local/bin \ && curl -LsS https://symfony.com/installer -o /usr/local/bin/symfony \ && chmod a+x /usr/local/bin/symfony \ - # Symfony 3 alias && echo 'alias dev="php bin/console -e=dev"' >> ~/.bashrc \ && echo 'alias prod="php bin/console -e=prod"' >> ~/.bashrc \ - # Symfony 2 alias # && echo 'alias dev="php app/console -e=dev"' >> ~/.bashrc \ # && echo 'alias prod="php app/console -e=prod"' >> ~/.bashrc \ - ;fi ##################################### diff --git a/workspace/Dockerfile-72 b/workspace/Dockerfile-72 index 3597a1f..473377f 100644 --- a/workspace/Dockerfile-72 +++ b/workspace/Dockerfile-72 @@ -55,6 +55,7 @@ ENV PGID ${PGID} RUN groupadd -g ${PGID} laradock && \ useradd -u ${PUID} -g laradock -m laradock -G docker_env + usermod -p "*" laradock ##################################### # SOAP: @@ -143,14 +144,23 @@ RUN chmod -R 644 /etc/cron.d ##################################### USER root +COPY ./aliases.sh /root/aliases.sh COPY ./aliases.sh /home/laradock/aliases.sh + +RUN sed -i 's/\r//' /root/aliases.sh && \ + sed -i 's/\r//' /home/laradock/aliases.sh && \ + chown laradock:laradock /home/laradock/aliases.sh && \ + echo "" >> ~/.bashrc && \ + echo "# Load Custom Aliases" >> ~/.bashrc && \ + echo "source ~/aliases.sh" >> ~/.bashrc && \ + echo "" >> ~/.bashrc + +USER laradock + RUN echo "" >> ~/.bashrc && \ echo "# Load Custom Aliases" >> ~/.bashrc && \ - echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \ - echo "" >> ~/.bashrc && \ - sed -i 's/\r//' /home/laradock/aliases.sh && \ - sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh && \ - chown laradock:laradock /home/laradock/aliases.sh + echo "source ~/aliases.sh" >> ~/.bashrc && \ + echo "" >> ~/.bashrc ##################################### # xDebug: @@ -192,8 +202,8 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \ ARG INSTALL_WORKSPACE_SSH=false ENV INSTALL_WORKSPACE_SSH ${INSTALL_WORKSPACE_SSH} -ADD insecure_id_rsa /tmp/id_rsa -ADD insecure_id_rsa.pub /tmp/id_rsa.pub +COPY insecure_id_rsa /tmp/id_rsa +COPY insecure_id_rsa.pub /tmp/id_rsa.pub RUN if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \ rm -f /etc/service/sshd/down && \ @@ -379,16 +389,12 @@ USER root ARG INSTALL_AEROSPIKE=false ENV INSTALL_AEROSPIKE ${INSTALL_AEROSPIKE} -# Copy aerospike configration for remote debugging -COPY ./aerospike.ini /etc/php/7.2/cli/conf.d/aerospike.ini - RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \ # Fix dependencies for PHPUnit within aerospike extension apt-get update -yqq && \ apt-get -y install sudo wget && \ - - # Install the php aerospike extension - curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/master.tar.gz" \ + # Install the php aerospike extension (using 7.2.0-in-progress branch until support for 7.2 on master) + curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/aerospike/aerospike-client-php/archive/7.2.0-in-progress.tar.gz" \ && mkdir -p aerospike-client-php \ && tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \ && ( \ @@ -398,10 +404,9 @@ RUN if [ ${INSTALL_AEROSPIKE} = true ]; then \ && make install \ ) \ && rm /tmp/aerospike-client-php.tar.gz \ -;fi - -RUN if [ ${INSTALL_AEROSPIKE} = false ]; then \ - rm /etc/php/7.2/cli/conf.d/aerospike.ini \ + && echo 'extension=aerospike.so' >> /etc/php/7.2/cli/conf.d/aerospike.ini \ + && echo 'aerospike.udf.lua_system_path=/usr/local/aerospike/lua' >> /etc/php/7.2/cli/conf.d/aerospike.ini \ + && echo 'aerospike.udf.lua_user_path=/usr/local/aerospike/usr-lua' >> /etc/php/7.2/cli/conf.d/aerospike.ini \ ;fi ##################################### @@ -507,7 +512,6 @@ ARG INSTALL_LINUXBREW=false ENV INSTALL_LINUXBREW ${INSTALL_LINUXBREW} RUN if [ ${INSTALL_LINUXBREW} = true ]; then \ - # Preparation apt-get upgrade -y && \ apt-get install -y build-essential make cmake scons curl git \ @@ -515,13 +519,10 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \ gettext libtool flex bison \ libbz2-dev libcurl4-openssl-dev \ libexpat-dev libncurses-dev && \ - # Install the Linuxbrew git clone --depth=1 https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew && \ - echo "" >> ~/.bashrc && \ echo 'export PKG_CONFIG_PATH"=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH"' >> ~/.bashrc && \ - # Setup linuxbrew echo 'export LINUXBREWHOME="$HOME/.linuxbrew"' >> ~/.bashrc && \ echo 'export PATH="$LINUXBREWHOME/bin:$PATH"' >> ~/.bashrc && \ @@ -536,7 +537,7 @@ RUN if [ ${INSTALL_LINUXBREW} = true ]; then \ ARG INSTALL_MSSQL=false ENV INSTALL_MSSQL ${INSTALL_MSSQL} -RUN if [ ${INSTALL_MSSQL} = true ]; then \ +RUN set -eux; if [ ${INSTALL_MSSQL} = true ]; then \ ##################################### # The following steps were taken from # https://github.com/Microsoft/msphpsql/wiki/Install-and-configuration @@ -563,6 +564,8 @@ RUN if [ ${INSTALL_MSSQL} = true ]; then \ locale-gen && \ echo "extension=sqlsrv.so" > /etc/php/7.2/cli/conf.d/20-sqlsrv.ini && \ echo "extension=pdo_sqlsrv.so" > /etc/php/7.2/cli/conf.d/20-pdo_sqlsrv.ini \ + && php -m | grep -q 'sqlsrv' \ + && php -m | grep -q 'pdo_sqlsrv' \ ;fi ##################################### @@ -601,19 +604,15 @@ USER root ARG INSTALL_SYMFONY=false ENV INSTALL_SYMFONY ${INSTALL_SYMFONY} RUN if [ ${INSTALL_SYMFONY} = true ]; then \ - mkdir -p /usr/local/bin \ && curl -LsS https://symfony.com/installer -o /usr/local/bin/symfony \ && chmod a+x /usr/local/bin/symfony \ - # Symfony 3 alias && echo 'alias dev="php bin/console -e=dev"' >> ~/.bashrc \ && echo 'alias prod="php bin/console -e=prod"' >> ~/.bashrc \ - # Symfony 2 alias # && echo 'alias dev="php app/console -e=dev"' >> ~/.bashrc \ # && echo 'alias prod="php app/console -e=prod"' >> ~/.bashrc \ - ;fi #####################################