...
 
Commits (4)
......@@ -13,3 +13,11 @@ build71:
- master
script:
- /bin/sh build/ci/build.sh 7.1
build72:
stage: build
only:
refs:
- master
script:
- /bin/sh build/ci/build.sh 7.2
FROM php:7.2-apache-stretch
# Add php.ini for more dev-specific PHP configuration
COPY php.ini /usr/local/etc/php/
# Add composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Install libsodum 1.0.17
RUN echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list
RUN apt-get update && apt-get -t stretch-backports install -y \
libsodium-dev
RUN pecl install -f libsodium-1.0.17
# Install xdebug
RUN apt-get update && \
apt-get install -y autoconf dpkg dpkg-dev file g++ gcc make pkgconf re2c && \
pecl install xdebug && \
chmod 777 /usr/local/etc/php/conf.d/ && \
rm -rf /var/lib/apt/lists/*
# TODO: Remove packages again, currently apt will bail out with:
# "WARNING: The following essential packages will be removed.
# This should NOT be done unless you know exactly what you are doing!"
#apt-get remove -y autoconf dpkg dpkg-dev file g++ gcc make pkgconf re2c && \
COPY team23-docker-php-enable-xdebug.sh /usr/local/bin/
RUN apt-get install -y openssl
# Install Magento-specific extensions
RUN apt-get update && \
apt-get install -y git mariadb-client openssh-client libfreetype6 libpng16-16 libjpeg62-turbo gettext libmcrypt4 libxslt1.1 libicu57 && \
apt-get install -y libfreetype6-dev libpng-dev libjpeg62-turbo-dev libmcrypt-dev libxslt1-dev libicu-dev libzip-dev zip unzip && \
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \
docker-php-ext-install -j$(getconf _NPROCESSORS_ONLN) gd bcmath soap gettext mysqli pdo_mysql opcache xsl zip intl calendar && \
apt-get remove -y libfreetype6-dev libpng-dev libjpeg62-turbo-dev libxslt1-dev libicu-dev && \
rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -my wget gnupg && \
curl -sL https://deb.nodesource.com/setup_12.x | bash - && \
apt-get install -y nodejs build-essential libssl-dev && \
npm install -g grunt-cli gulp-cli
RUN a2enmod proxy proxy_http proxy_http2 proxy_fcgi rewrite http2 expires deflate alias headers negotiation
COPY apache-default-vhost.conf /etc/apache2/sites-enabled/000-default.conf
# Enable our own entrypoint which can be used to install/enable xdebug using env variables
COPY team23-docker-php-entrypoint.sh /usr/local/bin/
ENTRYPOINT ["team23-docker-php-entrypoint.sh"]
# This has to be here again as ENTRYPOINT seems to reset CMD
CMD ["apache2-foreground"]
# Finally switch to our standard workdir
WORKDIR /app/web/
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
# DocumentRoot /var/www/html
DirectoryIndex index.html index.php
DocumentRoot /app/web/pub
<Directory "/app/web/pub">
EnableSendfile off
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
\ No newline at end of file
[PHP]
max_execution_time = 300
max_input_vars = 1500
upload_max_filesize = 32M
post_max_size=32M
always_populate_raw_post_data=-1
memory_limit=2G
; show errors in docker log
log_errors = On
error_log = /dev/stderr
#!/bin/bash
set -o errexit
set -o pipefail
# must be enabled as zend_extension, so just echo it instead of loading with php-ext-enable
echo "zend_extension=xdebug.so
xdebug.remote_port=${XDEBUG_REMOTE_PORT:-9000}
xdebug.remote_enable=${XDEBUG_REMOTE_ENABLE:-1}
xdebug.remote_connect_back=${XDEBUG_REMOTE_CONNECT_BACK:-0}
xdebug.remote_host=${XDEBUG_REMOTE_HOST:-10.254.254.254}
xdebug.max_nesting_level=${XDEBUG_MAX_NESTING_LEVEL:-400}" > /usr/local/etc/php/conf.d/xdebug_remote.ini
#!/bin/sh
set -e
[ ! -z "${TEAM23_DOCKER_PHP_ENABLE_XDEBUG:-}" ] && /usr/local/bin/team23-docker-php-enable-xdebug.sh
exec docker-php-entrypoint "$@"
# Magento 2 Dev Image
* `7.1`: [Dockerfile](7.1/Dockerfile)
* `7.2`: [Dockerfile](7.2/Dockerfile)
## Local Maschine Setup for Mac OS:
......