From 78bbe0d03cf1a537ec5a8f0bf4052f29fa2ebc01 Mon Sep 17 00:00:00 2001 From: Patrick Lee <31744877+patricklee2@users.noreply.github.com> Date: Wed, 29 May 2019 16:10:56 -0700 Subject: [PATCH 1/8] remove xdebug minor version --- 5.6-apache-xdebug/Dockerfile.template | 2 +- 7.0-apache-xdebug/Dockerfile.template | 2 +- 7.2-apache-xdebug/Dockerfile.template | 2 +- 7.3-apache-xdebug/Dockerfile.template | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/5.6-apache-xdebug/Dockerfile.template b/5.6-apache-xdebug/Dockerfile.template index 7bccd385..83d0821d 100644 --- a/5.6-apache-xdebug/Dockerfile.template +++ b/5.6-apache-xdebug/Dockerfile.template @@ -1,4 +1,4 @@ -FROM reponame/php:5.6.40-apache_buildnumber +FROM reponame/php:5.6-apache_buildnumber MAINTAINER Azure App Services Container Images RUN yes | pecl install xdebug-2.5.5 \ diff --git a/7.0-apache-xdebug/Dockerfile.template b/7.0-apache-xdebug/Dockerfile.template index b706585c..650385a1 100644 --- a/7.0-apache-xdebug/Dockerfile.template +++ b/7.0-apache-xdebug/Dockerfile.template @@ -1,4 +1,4 @@ -FROM reponame/php:7.0.33-apache_buildnumber +FROM reponame/php:7.0-apache_buildnumber MAINTAINER Azure App Services Container Images RUN yes | pecl install xdebug \ diff --git a/7.2-apache-xdebug/Dockerfile.template b/7.2-apache-xdebug/Dockerfile.template index cf0a6c76..6d04535e 100644 --- a/7.2-apache-xdebug/Dockerfile.template +++ b/7.2-apache-xdebug/Dockerfile.template @@ -1,4 +1,4 @@ -FROM reponame/php:7.2.15-apache_buildnumber +FROM reponame/php:7.2-apache_buildnumber MAINTAINER Azure App Services Container Images RUN yes | pecl install xdebug-beta \ diff --git a/7.3-apache-xdebug/Dockerfile.template b/7.3-apache-xdebug/Dockerfile.template index 38718385..18f9c080 100644 --- a/7.3-apache-xdebug/Dockerfile.template +++ b/7.3-apache-xdebug/Dockerfile.template @@ -1,4 +1,4 @@ -FROM reponame/php:7.3.2-apache_buildnumber +FROM reponame/php:7.3-apache_buildnumber MAINTAINER Azure App Services Container Images RUN yes | pecl install xdebug-beta \ From 422308d10eee645e89b9e06e3301caece9e6360d Mon Sep 17 00:00:00 2001 From: Patrick <31744877+patricklee2@users.noreply.github.com> Date: Fri, 7 Jun 2019 12:54:06 -0700 Subject: [PATCH 2/8] Create pull_request_template.md --- pull_request_template.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 pull_request_template.md diff --git a/pull_request_template.md b/pull_request_template.md new file mode 100644 index 00000000..c806487d --- /dev/null +++ b/pull_request_template.md @@ -0,0 +1,5 @@ + + +--------------------------- +* [ ] Are these changes auto-generated from Azure-App-Service/php-templates +* [ ] Have you made the same changes to Azure-App-Service/php-templates From 13eaeb3b53b1ebc983eb7d552a1feeaa632b86d6 Mon Sep 17 00:00:00 2001 From: Patrick <31744877+patricklee2@users.noreply.github.com> Date: Fri, 7 Jun 2019 13:05:51 -0700 Subject: [PATCH 3/8] Update pull_request_template.md --- pull_request_template.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pull_request_template.md b/pull_request_template.md index 4fe2358f..7b9c3416 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -1,2 +1,5 @@ -* [ ] Are these changes auto-generated from Azure-App-Service/php-templates -* [ ] Have you made the same changes to Azure-App-Service/php-templates + + +--------------------------- +* [ ] Are these changes auto-generated from [php-template](https://github.com/Azure-App-Service/php-template) +* [ ] Have you made the same changes to [php-template](https://github.com/Azure-App-Service/php-template) From 69e003af20c3441f72833ee05b0631aca0899cf6 Mon Sep 17 00:00:00 2001 From: appsvcbuild Date: Thu, 13 Jun 2019 17:28:07 -0700 Subject: [PATCH 4/8] appsvcbuild --- 5.6-apache/Dockerfile | 149 +++++--------------------- 5.6-apache/apache2.conf | 61 ----------- 5.6-apache/generateStartupCommand.sh | 14 --- 5.6-apache/init_container.sh | 28 +++-- 5.6-apache/ssh_setup.sh | 26 +++++ 7.0-apache/Dockerfile | 152 +++++--------------------- 7.0-apache/apache2.conf | 62 ----------- 7.0-apache/generateStartupCommand.sh | 14 --- 7.0-apache/init_container.sh | 28 +++-- 7.0-apache/ssh_setup.sh | 26 +++++ 7.2-apache/Dockerfile | 153 +++++---------------------- 7.2-apache/apache2.conf | 62 ----------- 7.2-apache/generateStartupCommand.sh | 14 --- 7.2-apache/init_container.sh | 28 +++-- 7.2-apache/ssh_setup.sh | 26 +++++ 7.3-apache/Dockerfile | 153 +++++---------------------- 7.3-apache/apache2.conf | 62 ----------- 7.3-apache/generateStartupCommand.sh | 14 --- 7.3-apache/init_container.sh | 28 +++-- 7.3-apache/ssh_setup.sh | 26 +++++ 20 files changed, 288 insertions(+), 838 deletions(-) delete mode 100644 5.6-apache/apache2.conf delete mode 100644 5.6-apache/generateStartupCommand.sh create mode 100644 5.6-apache/ssh_setup.sh delete mode 100644 7.0-apache/apache2.conf delete mode 100644 7.0-apache/generateStartupCommand.sh create mode 100644 7.0-apache/ssh_setup.sh delete mode 100644 7.2-apache/apache2.conf delete mode 100644 7.2-apache/generateStartupCommand.sh create mode 100644 7.2-apache/ssh_setup.sh delete mode 100644 7.3-apache/apache2.conf delete mode 100644 7.3-apache/generateStartupCommand.sh create mode 100644 7.3-apache/ssh_setup.sh diff --git a/5.6-apache/Dockerfile b/5.6-apache/Dockerfile index ecff16d0..07ca847a 100644 --- a/5.6-apache/Dockerfile +++ b/5.6-apache/Dockerfile @@ -1,140 +1,47 @@ -FROM php:5.6.40-apache +FROM mcr.microsoft.com/oryx/php:5.6-20190607.1 LABEL maintainer="Azure App Services Container Images " -ENV PHP_VERSION 5.6.40 -COPY apache2.conf /bin/ +ENV PHP_VERSION 5.6 + COPY init_container.sh /bin/ COPY hostingstart.html /home/site/wwwroot/hostingstart.html -RUN a2enmod rewrite expires include deflate - -# install the PHP extensions we need -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - libpng-dev \ - libjpeg-dev \ - libpq-dev \ - libmcrypt-dev \ - libldap2-dev \ - libldb-dev \ - libicu-dev \ - libgmp-dev \ - libmagickwand-dev \ - libc-client-dev \ - libtidy-dev \ - libkrb5-dev \ - libxslt-dev \ - unixodbc-dev \ - openssh-server \ - vim \ - curl \ - wget \ - tcptraceroute \ - && chmod 755 /bin/init_container.sh \ +RUN chmod 755 /bin/init_container.sh \ + && mkdir -p /home/LogFiles/ \ && echo "root:Docker!" | chpasswd \ - && echo "cd /home" >> /etc/bash.bashrc \ - && ln -s /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/libldap.so \ - && ln -s /usr/lib/x86_64-linux-gnu/liblber.so /usr/lib/liblber.so \ - && ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h \ - && rm -rf /var/lib/apt/lists/* \ - && pecl install imagick-beta \ - && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \ - && docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ - && docker-php-ext-configure pdo_odbc --with-pdo-odbc=unixODBC,/usr \ - && docker-php-ext-install gd \ - mysqli \ - opcache \ - pdo \ - pdo_mysql \ - pdo_pgsql \ - pgsql \ - ldap \ - intl \ - mcrypt \ - gmp \ - zip \ - bcmath \ - mbstring \ - pcntl \ - calendar \ - exif \ - gettext \ - imap \ - tidy \ - shmop \ - soap \ - sockets \ - sysvmsg \ - sysvsem \ - sysvshm \ - pdo_odbc \ - wddx \ - xmlrpc \ - xsl \ - && docker-php-ext-enable imagick - -# install odbc php ext -RUN apt-get update \ - && apt-get install unixodbc-dev - -RUN set -x \ - && docker-php-source extract \ - && cd /usr/src/php/ext/odbc \ - && phpize \ - && sed -ri 's@^ *test +"\$PHP_.*" *= *"no" *&& *PHP_.*=yes *$@#&@g' configure \ - && ./configure --with-unixODBC=shared,/usr \ - && docker-php-ext-install odbc + && echo "cd /home/site/wwwroot" >> /etc/bash.bashrc \ + && ln -s /home/site/wwwroot /var/www/html \ + && mkdir -p /opt/startup -RUN \ - rm -f /var/log/apache2/* \ - && rmdir /var/lock/apache2 \ - && rmdir /var/run/apache2 \ - && rmdir /var/log/apache2 \ - && chmod 777 /var/log \ - && chmod 777 /var/run \ - && chmod 777 /var/lock \ - && chmod 777 /bin/init_container.sh \ - && cp /bin/apache2.conf /etc/apache2/apache2.conf \ - && rm -rf /var/www/html \ - && rm -rf /var/log/apache2 \ - && mkdir -p /home/LogFiles \ - && ln -s /home/site/wwwroot /var/www/html \ - && ln -s /home/LogFiles /var/log/apache2 - -RUN { \ - echo 'opcache.memory_consumption=128'; \ - echo 'opcache.interned_strings_buffer=8'; \ - echo 'opcache.max_accelerated_files=4000'; \ - echo 'opcache.revalidate_freq=60'; \ - echo 'opcache.fast_shutdown=1'; \ - echo 'opcache.enable_cli=1'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini - -RUN { \ - echo 'error_log=/var/log/apache2/php-error.log'; \ - echo 'display_errors=Off'; \ - echo 'log_errors=On'; \ - echo 'display_startup_errors=Off'; \ - echo 'date.timezone=UTC'; \ - } > /usr/local/etc/php/conf.d/php.ini +# configure startup +COPY sshd_config /etc/ssh/ +COPY ssh_setup.sh /tmp +RUN mkdir -p /opt/startup \ + && chmod -R +x /opt/startup \ + && chmod -R +x /tmp/ssh_setup.sh \ + && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ + && rm -rf /tmp/* ENV PORT 8080 ENV SSH_PORT 2222 EXPOSE 2222 8080 COPY sshd_config /etc/ssh/ -ENV APACHE_RUN_USER www-data - -# setup default site -RUN mkdir -p /opt/startup -COPY generateStartupCommand.sh /opt/startup/generateStartupCommand.sh -RUN chmod 755 /opt/startup/generateStartupCommand.sh - ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance ENV WEBSITE_INSTANCE_ID localInstance ENV PATH ${PATH}:/home/site/wwwroot -WORKDIR /var/www/html +RUN sed -i 's!ErrorLog ${APACHE_LOG_DIR}/error.log!ErrorLog /dev/stderr!g' /etc/apache2/apache2.conf +RUN sed -i 's!User ${APACHE_RUN_USER}!User www-data!g' /etc/apache2/apache2.conf +RUN sed -i 's!User ${APACHE_RUN_GROUP}!Group www-data!g' /etc/apache2/apache2.conf -ENTRYPOINT ["/bin/init_container.sh"] +RUN { \ + echo 'DocumentRoot /home/site/wwwroot'; \ + echo 'DirectoryIndex default.htm default.html index.htm index.html index.php hostingstart.html'; \ + echo 'ServerName localhost'; \ + echo 'CustomLog /dev/stdout combined'; \ +} >> /etc/apache2/apache2.conf + +WORKDIR /home/site/wwwroot +ENTRYPOINT ["/bin/init_container.sh"] diff --git a/5.6-apache/apache2.conf b/5.6-apache/apache2.conf deleted file mode 100644 index 4f1add6a..00000000 --- a/5.6-apache/apache2.conf +++ /dev/null @@ -1,61 +0,0 @@ -# see http://sources.debian.net/src/apache2/2.4.10-1/debian/config-dir/apache2.conf - -Mutex file:/var/lock/apache2 default -PidFile /var/run/apache2/apache2.pid -Timeout 300 -KeepAlive On -MaxKeepAliveRequests 100 -KeepAliveTimeout 5 -User www-data -Group www-data -HostnameLookups Off -ErrorLog /dev/stderr -LogLevel warn - -IncludeOptional mods-enabled/*.load -IncludeOptional mods-enabled/*.conf - -IncludeOptional conf-enabled/*.conf -IncludeOptional sites-enabled/*.conf - -# ports.conf -Listen {PORT} - - - Options FollowSymLinks - AllowOverride None - Require all denied - - - - AllowOverride All - Require all granted - - -DocumentRoot /var/www/html - -AccessFileName .htaccess - - Require all denied - - -LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined -LogFormat "\"%{X-Client-IP}i\" %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined -LogFormat "%h %l %u %t \"%r\" %>s %O" common -LogFormat "%{Referer}i -> %U" referer -LogFormat "%{User-agent}i" agent - -CustomLog /dev/stdout combined - - - SetHandler application/x-httpd-php - - -# Multiple DirectoryIndex directives within the same context will add -# to the list of resources to look for rather than replace -# https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex -DirectoryIndex disabled -DirectoryIndex default.htm default.html index.htm index.html index.php hostingstart.html - -ServerTokens Prod -ServerSignature Off diff --git a/5.6-apache/generateStartupCommand.sh b/5.6-apache/generateStartupCommand.sh deleted file mode 100644 index fb412641..00000000 --- a/5.6-apache/generateStartupCommand.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -CMDFILE="/opt/startup/startupCommand" -DEFAULT_COMMAND="/usr/sbin/apache2ctl -D FOREGROUND" - -touch "$CMDFILE" - -CUSTOM_STARTUP_COMMAND=`cat $CMDFILE` - -if [ -z "$CUSTOM_STARTUP_COMMAND" ] -then - startupCommand="$DEFAULT_COMMAND" - echo "$startupCommand" >> "$CMDFILE" -fi diff --git a/5.6-apache/init_container.sh b/5.6-apache/init_container.sh index 727a527a..6a9fa7dd 100644 --- a/5.6-apache/init_container.sh +++ b/5.6-apache/init_container.sh @@ -17,16 +17,24 @@ cat /etc/motd # Get environment variables to show up in SSH session eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) +# starting sshd process sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config -service ssh start -sed -i "s/{PORT}/$PORT/g" /etc/apache2/apache2.conf -mkdir /var/lock/apache2 -mkdir /var/run/apache2 +/usr/sbin/sshd -echo "$@" > /opt/startup/startupCommand -/opt/startup/generateStartupCommand.sh -chmod 755 /opt/startup/startupCommand +appPath="/home/site/wwwroot" +runFromPath="/tmp/webapp" +startupCommandPath="/opt/startup/startup.sh" +userStartupCommand="$@" +if [ -z "$userStartupCommand" ] +then + userStartupCommand="apache2-foreground"; +else + userStartupCommand="$userStartupCommand; apache2-foreground;" +fi -STARTUPCOMMAND=$(cat /opt/startup/startupCommand) -echo "Running $STARTUPCOMMAND" -eval "exec $STARTUPCOMMAND" +oryxArgs="-appPath $appPath -output $startupCommandPath \ + -bindPort $PORT -startupCommand '$userStartupCommand'" + +echo "Running oryx $oryxArgs" +eval oryx $oryxArgs +$startupCommandPath diff --git a/5.6-apache/ssh_setup.sh b/5.6-apache/ssh_setup.sh new file mode 100644 index 00000000..8bc40cc2 --- /dev/null +++ b/5.6-apache/ssh_setup.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then + # generate fresh rsa key + ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa +fi + +if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then + # generate fresh dsa key + ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa +fi + +if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then + # generate fresh ecdsa key + ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa +fi + +if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then + # generate fresh ecdsa key + ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa +fi + +#prepare run dir +if [ ! -d "/var/run/sshd" ]; then + mkdir -p /var/run/sshd +fi diff --git a/7.0-apache/Dockerfile b/7.0-apache/Dockerfile index 6e308872..ec35e422 100644 --- a/7.0-apache/Dockerfile +++ b/7.0-apache/Dockerfile @@ -1,143 +1,47 @@ -FROM php:7.0.33-apache +FROM mcr.microsoft.com/oryx/php:7.0-20190607.1 LABEL maintainer="Azure App Services Container Images " -ENV PHP_VERSION 7.0.33 -COPY apache2.conf /bin/ +ENV PHP_VERSION 7.0 + COPY init_container.sh /bin/ COPY hostingstart.html /home/site/wwwroot/hostingstart.html -RUN a2enmod rewrite expires include deflate - -# install the PHP extensions we need -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - libpng-dev \ - libjpeg-dev \ - libpq-dev \ - libmcrypt-dev \ - libldap2-dev \ - libldb-dev \ - libicu-dev \ - libgmp-dev \ - libmagickwand-dev \ - libc-client-dev \ - libtidy-dev \ - libkrb5-dev \ - libxslt-dev \ - unixodbc-dev \ - openssh-server \ - vim \ - curl \ - wget \ - tcptraceroute \ - && chmod 755 /bin/init_container.sh \ +RUN chmod 755 /bin/init_container.sh \ + && mkdir -p /home/LogFiles/ \ && echo "root:Docker!" | chpasswd \ - && echo "cd /home" >> /etc/bash.bashrc \ - && ln -s /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/libldap.so \ - && ln -s /usr/lib/x86_64-linux-gnu/liblber.so /usr/lib/liblber.so \ - && ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h \ - && rm -rf /var/lib/apt/lists/* \ - && pecl install imagick-beta \ - && pecl install sqlsrv-5.3.0 pdo_sqlsrv-5.3.0 \ - && echo extension=pdo_sqlsrv.so >> `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/30-pdo_sqlsrv.ini \ - && echo extension=sqlsrv.so >> `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/20-sqlsrv.ini \ - && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \ - && docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ - && docker-php-ext-configure pdo_odbc --with-pdo-odbc=unixODBC,/usr \ - && docker-php-ext-install gd \ - mysqli \ - opcache \ - pdo \ - pdo_mysql \ - pdo_pgsql \ - pgsql \ - ldap \ - intl \ - mcrypt \ - gmp \ - zip \ - bcmath \ - mbstring \ - pcntl \ - calendar \ - exif \ - gettext \ - imap \ - tidy \ - shmop \ - soap \ - sockets \ - sysvmsg \ - sysvsem \ - sysvshm \ - pdo_odbc \ - wddx \ - xmlrpc \ - xsl \ - && docker-php-ext-enable imagick - -# install odbc php ext -RUN apt-get update \ - && apt-get install unixodbc-dev - -RUN set -x \ - && docker-php-source extract \ - && cd /usr/src/php/ext/odbc \ - && phpize \ - && sed -ri 's@^ *test +"\$PHP_.*" *= *"no" *&& *PHP_.*=yes *$@#&@g' configure \ - && ./configure --with-unixODBC=shared,/usr \ - && docker-php-ext-install odbc - -RUN \ - rm -f /var/log/apache2/* \ - && rmdir /var/lock/apache2 \ - && rmdir /var/run/apache2 \ - && rmdir /var/log/apache2 \ - && chmod 777 /var/log \ - && chmod 777 /var/run \ - && chmod 777 /var/lock \ - && chmod 777 /bin/init_container.sh \ - && cp /bin/apache2.conf /etc/apache2/apache2.conf \ - && rm -rf /var/www/html \ - && rm -rf /var/log/apache2 \ - && mkdir -p /home/LogFiles \ - && ln -s /home/site/wwwroot /var/www/html \ - && ln -s /home/LogFiles /var/log/apache2 - - -RUN { \ - echo 'opcache.memory_consumption=128'; \ - echo 'opcache.interned_strings_buffer=8'; \ - echo 'opcache.max_accelerated_files=4000'; \ - echo 'opcache.revalidate_freq=60'; \ - echo 'opcache.fast_shutdown=1'; \ - echo 'opcache.enable_cli=1'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + && echo "cd /home/site/wwwroot" >> /etc/bash.bashrc \ + && ln -s /home/site/wwwroot /var/www/html \ + && mkdir -p /opt/startup -RUN { \ - echo 'error_log=/var/log/apache2/php-error.log'; \ - echo 'display_errors=Off'; \ - echo 'log_errors=On'; \ - echo 'display_startup_errors=Off'; \ - echo 'date.timezone=UTC'; \ - } > /usr/local/etc/php/conf.d/php.ini +# configure startup +COPY sshd_config /etc/ssh/ +COPY ssh_setup.sh /tmp +RUN mkdir -p /opt/startup \ + && chmod -R +x /opt/startup \ + && chmod -R +x /tmp/ssh_setup.sh \ + && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ + && rm -rf /tmp/* ENV PORT 8080 ENV SSH_PORT 2222 EXPOSE 2222 8080 COPY sshd_config /etc/ssh/ -ENV APACHE_RUN_USER www-data - -# setup default site -RUN mkdir -p /opt/startup -COPY generateStartupCommand.sh /opt/startup/generateStartupCommand.sh -RUN chmod 755 /opt/startup/generateStartupCommand.sh - ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance ENV WEBSITE_INSTANCE_ID localInstance ENV PATH ${PATH}:/home/site/wwwroot -WORKDIR /var/www/html +RUN sed -i 's!ErrorLog ${APACHE_LOG_DIR}/error.log!ErrorLog /dev/stderr!g' /etc/apache2/apache2.conf +RUN sed -i 's!User ${APACHE_RUN_USER}!User www-data!g' /etc/apache2/apache2.conf +RUN sed -i 's!User ${APACHE_RUN_GROUP}!Group www-data!g' /etc/apache2/apache2.conf + +RUN { \ + echo 'DocumentRoot /home/site/wwwroot'; \ + echo 'DirectoryIndex default.htm default.html index.htm index.html index.php hostingstart.html'; \ + echo 'ServerName localhost'; \ + echo 'CustomLog /dev/stdout combined'; \ +} >> /etc/apache2/apache2.conf + +WORKDIR /home/site/wwwroot ENTRYPOINT ["/bin/init_container.sh"] diff --git a/7.0-apache/apache2.conf b/7.0-apache/apache2.conf deleted file mode 100644 index 1b70420d..00000000 --- a/7.0-apache/apache2.conf +++ /dev/null @@ -1,62 +0,0 @@ -# see http://sources.debian.net/src/apache2/2.4.10-1/debian/config-dir/apache2.conf - -Mutex file:/var/lock/apache2 default -PidFile /var/run/apache2/apache2.pid -Timeout 300 -KeepAlive On -MaxKeepAliveRequests 100 -KeepAliveTimeout 5 -User www-data -Group www-data -HostnameLookups Off -ErrorLog /dev/stderr -LogLevel warn - -IncludeOptional mods-enabled/*.load -IncludeOptional mods-enabled/*.conf - -IncludeOptional conf-enabled/*.conf -IncludeOptional sites-enabled/*.conf - -# ports.conf -Listen {PORT} - - - Options FollowSymLinks - AllowOverride None - Require all denied - - - - AllowOverride All - Require all granted - - -DocumentRoot /var/www/html - -AccessFileName .htaccess - - Require all denied - - -LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined -LogFormat "\"%{X-Client-IP}i\" %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined -LogFormat "%h %l %u %t \"%r\" %>s %O" common -LogFormat "%{Referer}i -> %U" referer -LogFormat "%{User-agent}i" agent - -CustomLog /dev/stdout combined - - - SetHandler application/x-httpd-php - - -# Multiple DirectoryIndex directives within the same context will add -# to the list of resources to look for rather than replace -# https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex -DirectoryIndex disabled -DirectoryIndex default.htm default.html index.htm index.html index.php hostingstart.html - -ServerTokens Prod -ServerSignature Off - diff --git a/7.0-apache/generateStartupCommand.sh b/7.0-apache/generateStartupCommand.sh deleted file mode 100644 index fb412641..00000000 --- a/7.0-apache/generateStartupCommand.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -CMDFILE="/opt/startup/startupCommand" -DEFAULT_COMMAND="/usr/sbin/apache2ctl -D FOREGROUND" - -touch "$CMDFILE" - -CUSTOM_STARTUP_COMMAND=`cat $CMDFILE` - -if [ -z "$CUSTOM_STARTUP_COMMAND" ] -then - startupCommand="$DEFAULT_COMMAND" - echo "$startupCommand" >> "$CMDFILE" -fi diff --git a/7.0-apache/init_container.sh b/7.0-apache/init_container.sh index 727a527a..6a9fa7dd 100644 --- a/7.0-apache/init_container.sh +++ b/7.0-apache/init_container.sh @@ -17,16 +17,24 @@ cat /etc/motd # Get environment variables to show up in SSH session eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) +# starting sshd process sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config -service ssh start -sed -i "s/{PORT}/$PORT/g" /etc/apache2/apache2.conf -mkdir /var/lock/apache2 -mkdir /var/run/apache2 +/usr/sbin/sshd -echo "$@" > /opt/startup/startupCommand -/opt/startup/generateStartupCommand.sh -chmod 755 /opt/startup/startupCommand +appPath="/home/site/wwwroot" +runFromPath="/tmp/webapp" +startupCommandPath="/opt/startup/startup.sh" +userStartupCommand="$@" +if [ -z "$userStartupCommand" ] +then + userStartupCommand="apache2-foreground"; +else + userStartupCommand="$userStartupCommand; apache2-foreground;" +fi -STARTUPCOMMAND=$(cat /opt/startup/startupCommand) -echo "Running $STARTUPCOMMAND" -eval "exec $STARTUPCOMMAND" +oryxArgs="-appPath $appPath -output $startupCommandPath \ + -bindPort $PORT -startupCommand '$userStartupCommand'" + +echo "Running oryx $oryxArgs" +eval oryx $oryxArgs +$startupCommandPath diff --git a/7.0-apache/ssh_setup.sh b/7.0-apache/ssh_setup.sh new file mode 100644 index 00000000..8bc40cc2 --- /dev/null +++ b/7.0-apache/ssh_setup.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then + # generate fresh rsa key + ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa +fi + +if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then + # generate fresh dsa key + ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa +fi + +if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then + # generate fresh ecdsa key + ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa +fi + +if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then + # generate fresh ecdsa key + ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa +fi + +#prepare run dir +if [ ! -d "/var/run/sshd" ]; then + mkdir -p /var/run/sshd +fi diff --git a/7.2-apache/Dockerfile b/7.2-apache/Dockerfile index fa56f17f..1bc96e4b 100644 --- a/7.2-apache/Dockerfile +++ b/7.2-apache/Dockerfile @@ -1,144 +1,47 @@ -FROM php:7.2.15-apache +FROM mcr.microsoft.com/oryx/php:7.2-20190607.1 LABEL maintainer="Azure App Services Container Images " -ENV PHP_VERSION 7.2.15 -COPY apache2.conf /bin/ +ENV PHP_VERSION 7.2 + COPY init_container.sh /bin/ COPY hostingstart.html /home/site/wwwroot/hostingstart.html -RUN a2enmod rewrite expires include deflate - -# install the PHP extensions we need -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - libpng-dev \ - libjpeg-dev \ - libpq-dev \ - libmcrypt-dev \ - libldap2-dev \ - libldb-dev \ - libicu-dev \ - libgmp-dev \ - libmagickwand-dev \ - libc-client-dev \ - libtidy-dev \ - libkrb5-dev \ - libxslt-dev \ - unixodbc-dev \ - openssh-server \ - vim \ - curl \ - wget \ - tcptraceroute \ - && chmod 755 /bin/init_container.sh \ +RUN chmod 755 /bin/init_container.sh \ + && mkdir -p /home/LogFiles/ \ && echo "root:Docker!" | chpasswd \ - && echo "cd /home" >> /etc/bash.bashrc \ - && ln -s /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/libldap.so \ - && ln -s /usr/lib/x86_64-linux-gnu/liblber.so /usr/lib/liblber.so \ - && ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h \ - && rm -rf /var/lib/apt/lists/* \ - && pecl install imagick-beta \ - && pecl install mcrypt-1.0.1 \ - && pecl install sqlsrv pdo_sqlsrv \ - && echo extension=pdo_sqlsrv.so >> `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/30-pdo_sqlsrv.ini \ - && echo extension=sqlsrv.so >> `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/20-sqlsrv.ini \ - && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \ - && docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ - && docker-php-ext-configure pdo_odbc --with-pdo-odbc=unixODBC,/usr \ - && docker-php-ext-install gd \ - mysqli \ - opcache \ - pdo \ - pdo_mysql \ - pdo_pgsql \ - pgsql \ - ldap \ - intl \ - gmp \ - zip \ - bcmath \ - mbstring \ - pcntl \ - calendar \ - exif \ - gettext \ - imap \ - tidy \ - shmop \ - soap \ - sockets \ - sysvmsg \ - sysvsem \ - sysvshm \ - pdo_odbc \ - wddx \ - xmlrpc \ - xsl \ - && docker-php-ext-enable imagick \ - && docker-php-ext-enable mcrypt - -# install odbc php ext -RUN apt-get update \ - && apt-get install unixodbc-dev - -RUN set -x \ - && docker-php-source extract \ - && cd /usr/src/php/ext/odbc \ - && phpize \ - && sed -ri 's@^ *test +"\$PHP_.*" *= *"no" *&& *PHP_.*=yes *$@#&@g' configure \ - && ./configure --with-unixODBC=shared,/usr \ - && docker-php-ext-install odbc - -RUN \ - rm -f /var/log/apache2/* \ - && rmdir /var/lock/apache2 \ - && rmdir /var/run/apache2 \ - && rmdir /var/log/apache2 \ - && chmod 777 /var/log \ - && chmod 777 /var/run \ - && chmod 777 /var/lock \ - && chmod 777 /bin/init_container.sh \ - && cp /bin/apache2.conf /etc/apache2/apache2.conf \ - && rm -rf /var/www/html \ - && rm -rf /var/log/apache2 \ - && mkdir -p /home/LogFiles \ - && ln -s /home/site/wwwroot /var/www/html \ - && ln -s /home/LogFiles /var/log/apache2 - - -RUN { \ - echo 'opcache.memory_consumption=128'; \ - echo 'opcache.interned_strings_buffer=8'; \ - echo 'opcache.max_accelerated_files=4000'; \ - echo 'opcache.revalidate_freq=60'; \ - echo 'opcache.fast_shutdown=1'; \ - echo 'opcache.enable_cli=1'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + && echo "cd /home/site/wwwroot" >> /etc/bash.bashrc \ + && ln -s /home/site/wwwroot /var/www/html \ + && mkdir -p /opt/startup -RUN { \ - echo 'error_log=/var/log/apache2/php-error.log'; \ - echo 'display_errors=Off'; \ - echo 'log_errors=On'; \ - echo 'display_startup_errors=Off'; \ - echo 'date.timezone=UTC'; \ - } > /usr/local/etc/php/conf.d/php.ini +# configure startup +COPY sshd_config /etc/ssh/ +COPY ssh_setup.sh /tmp +RUN mkdir -p /opt/startup \ + && chmod -R +x /opt/startup \ + && chmod -R +x /tmp/ssh_setup.sh \ + && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ + && rm -rf /tmp/* ENV PORT 8080 ENV SSH_PORT 2222 EXPOSE 2222 8080 COPY sshd_config /etc/ssh/ -ENV APACHE_RUN_USER www-data - -# setup default site -RUN mkdir -p /opt/startup -COPY generateStartupCommand.sh /opt/startup/generateStartupCommand.sh -RUN chmod 755 /opt/startup/generateStartupCommand.sh - ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance ENV WEBSITE_INSTANCE_ID localInstance ENV PATH ${PATH}:/home/site/wwwroot -WORKDIR /var/www/html +RUN sed -i 's!ErrorLog ${APACHE_LOG_DIR}/error.log!ErrorLog /dev/stderr!g' /etc/apache2/apache2.conf +RUN sed -i 's!User ${APACHE_RUN_USER}!User www-data!g' /etc/apache2/apache2.conf +RUN sed -i 's!User ${APACHE_RUN_GROUP}!Group www-data!g' /etc/apache2/apache2.conf + +RUN { \ + echo 'DocumentRoot /home/site/wwwroot'; \ + echo 'DirectoryIndex default.htm default.html index.htm index.html index.php hostingstart.html'; \ + echo 'ServerName localhost'; \ + echo 'CustomLog /dev/stdout combined'; \ +} >> /etc/apache2/apache2.conf + +WORKDIR /home/site/wwwroot ENTRYPOINT ["/bin/init_container.sh"] diff --git a/7.2-apache/apache2.conf b/7.2-apache/apache2.conf deleted file mode 100644 index 1b70420d..00000000 --- a/7.2-apache/apache2.conf +++ /dev/null @@ -1,62 +0,0 @@ -# see http://sources.debian.net/src/apache2/2.4.10-1/debian/config-dir/apache2.conf - -Mutex file:/var/lock/apache2 default -PidFile /var/run/apache2/apache2.pid -Timeout 300 -KeepAlive On -MaxKeepAliveRequests 100 -KeepAliveTimeout 5 -User www-data -Group www-data -HostnameLookups Off -ErrorLog /dev/stderr -LogLevel warn - -IncludeOptional mods-enabled/*.load -IncludeOptional mods-enabled/*.conf - -IncludeOptional conf-enabled/*.conf -IncludeOptional sites-enabled/*.conf - -# ports.conf -Listen {PORT} - - - Options FollowSymLinks - AllowOverride None - Require all denied - - - - AllowOverride All - Require all granted - - -DocumentRoot /var/www/html - -AccessFileName .htaccess - - Require all denied - - -LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined -LogFormat "\"%{X-Client-IP}i\" %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined -LogFormat "%h %l %u %t \"%r\" %>s %O" common -LogFormat "%{Referer}i -> %U" referer -LogFormat "%{User-agent}i" agent - -CustomLog /dev/stdout combined - - - SetHandler application/x-httpd-php - - -# Multiple DirectoryIndex directives within the same context will add -# to the list of resources to look for rather than replace -# https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex -DirectoryIndex disabled -DirectoryIndex default.htm default.html index.htm index.html index.php hostingstart.html - -ServerTokens Prod -ServerSignature Off - diff --git a/7.2-apache/generateStartupCommand.sh b/7.2-apache/generateStartupCommand.sh deleted file mode 100644 index fb412641..00000000 --- a/7.2-apache/generateStartupCommand.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -CMDFILE="/opt/startup/startupCommand" -DEFAULT_COMMAND="/usr/sbin/apache2ctl -D FOREGROUND" - -touch "$CMDFILE" - -CUSTOM_STARTUP_COMMAND=`cat $CMDFILE` - -if [ -z "$CUSTOM_STARTUP_COMMAND" ] -then - startupCommand="$DEFAULT_COMMAND" - echo "$startupCommand" >> "$CMDFILE" -fi diff --git a/7.2-apache/init_container.sh b/7.2-apache/init_container.sh index 727a527a..6a9fa7dd 100644 --- a/7.2-apache/init_container.sh +++ b/7.2-apache/init_container.sh @@ -17,16 +17,24 @@ cat /etc/motd # Get environment variables to show up in SSH session eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) +# starting sshd process sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config -service ssh start -sed -i "s/{PORT}/$PORT/g" /etc/apache2/apache2.conf -mkdir /var/lock/apache2 -mkdir /var/run/apache2 +/usr/sbin/sshd -echo "$@" > /opt/startup/startupCommand -/opt/startup/generateStartupCommand.sh -chmod 755 /opt/startup/startupCommand +appPath="/home/site/wwwroot" +runFromPath="/tmp/webapp" +startupCommandPath="/opt/startup/startup.sh" +userStartupCommand="$@" +if [ -z "$userStartupCommand" ] +then + userStartupCommand="apache2-foreground"; +else + userStartupCommand="$userStartupCommand; apache2-foreground;" +fi -STARTUPCOMMAND=$(cat /opt/startup/startupCommand) -echo "Running $STARTUPCOMMAND" -eval "exec $STARTUPCOMMAND" +oryxArgs="-appPath $appPath -output $startupCommandPath \ + -bindPort $PORT -startupCommand '$userStartupCommand'" + +echo "Running oryx $oryxArgs" +eval oryx $oryxArgs +$startupCommandPath diff --git a/7.2-apache/ssh_setup.sh b/7.2-apache/ssh_setup.sh new file mode 100644 index 00000000..8bc40cc2 --- /dev/null +++ b/7.2-apache/ssh_setup.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then + # generate fresh rsa key + ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa +fi + +if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then + # generate fresh dsa key + ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa +fi + +if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then + # generate fresh ecdsa key + ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa +fi + +if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then + # generate fresh ecdsa key + ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa +fi + +#prepare run dir +if [ ! -d "/var/run/sshd" ]; then + mkdir -p /var/run/sshd +fi diff --git a/7.3-apache/Dockerfile b/7.3-apache/Dockerfile index 5588d919..906e3369 100644 --- a/7.3-apache/Dockerfile +++ b/7.3-apache/Dockerfile @@ -1,144 +1,47 @@ -FROM php:7.3.2-apache +FROM mcr.microsoft.com/oryx/php:7.3-20190607.1 LABEL maintainer="Azure App Services Container Images " -ENV PHP_VERSION 7.3.2 -COPY apache2.conf /bin/ +ENV PHP_VERSION 7.3 + COPY init_container.sh /bin/ COPY hostingstart.html /home/site/wwwroot/hostingstart.html -RUN a2enmod rewrite expires include deflate - -# install the PHP extensions we need -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - libpng-dev \ - libjpeg-dev \ - libpq-dev \ - libldap2-dev \ - libldb-dev \ - libicu-dev \ - libgmp-dev \ - libmagickwand-dev \ - libc-client-dev \ - libtidy-dev \ - libkrb5-dev \ - libxslt-dev \ - libzip-dev \ - unixodbc-dev \ - openssh-server \ - openssl \ - libssl-dev \ - vim \ - curl \ - wget \ - tcptraceroute \ - && chmod 755 /bin/init_container.sh \ +RUN chmod 755 /bin/init_container.sh \ + && mkdir -p /home/LogFiles/ \ && echo "root:Docker!" | chpasswd \ - && echo "cd /home" >> /etc/bash.bashrc \ - && ln -s /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/libldap.so \ - && ln -s /usr/lib/x86_64-linux-gnu/liblber.so /usr/lib/liblber.so \ - && ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h \ - && rm -rf /var/lib/apt/lists/* \ - && pecl install imagick-beta \ - && pecl install sqlsrv pdo_sqlsrv \ - && echo extension=pdo_sqlsrv.so >> `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/30-pdo_sqlsrv.ini \ - && echo extension=sqlsrv.so >> `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/20-sqlsrv.ini \ - && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \ - && docker-php-ext-configure imap --with-kerberos --with-imap-ssl \ - && docker-php-ext-configure pdo_odbc --with-pdo-odbc=unixODBC,/usr \ - && docker-php-ext-install gd \ - mysqli \ - opcache \ - pdo \ - pdo_mysql \ - pdo_pgsql \ - pgsql \ - ldap \ - intl \ - gmp \ - zip \ - bcmath \ - mbstring \ - pcntl \ - calendar \ - exif \ - gettext \ - imap \ - tidy \ - shmop \ - soap \ - sockets \ - sysvmsg \ - sysvsem \ - sysvshm \ - pdo_odbc \ - wddx \ - xmlrpc \ - xsl \ - && docker-php-ext-enable imagick - -# install odbc php ext -RUN apt-get update \ - && apt-get install unixodbc-dev - -RUN set -x \ - && docker-php-source extract \ - && cd /usr/src/php/ext/odbc \ - && phpize \ - && sed -ri 's@^ *test +"\$PHP_.*" *= *"no" *&& *PHP_.*=yes *$@#&@g' configure \ - && ./configure --with-unixODBC=shared,/usr \ - && docker-php-ext-install odbc - -RUN \ - rm -f /var/log/apache2/* \ - && rmdir /var/lock/apache2 \ - && rmdir /var/run/apache2 \ - && rmdir /var/log/apache2 \ - && chmod 777 /var/log \ - && chmod 777 /var/run \ - && chmod 777 /var/lock \ - && chmod 777 /bin/init_container.sh \ - && cp /bin/apache2.conf /etc/apache2/apache2.conf \ - && rm -rf /var/www/html \ - && rm -rf /var/log/apache2 \ - && mkdir -p /home/LogFiles \ - && ln -s /home/site/wwwroot /var/www/html \ - && ln -s /home/LogFiles /var/log/apache2 - - -RUN { \ - echo 'opcache.memory_consumption=128'; \ - echo 'opcache.interned_strings_buffer=8'; \ - echo 'opcache.max_accelerated_files=4000'; \ - echo 'opcache.revalidate_freq=60'; \ - echo 'opcache.fast_shutdown=1'; \ - echo 'opcache.enable_cli=1'; \ - } > /usr/local/etc/php/conf.d/opcache-recommended.ini + && echo "cd /home/site/wwwroot" >> /etc/bash.bashrc \ + && ln -s /home/site/wwwroot /var/www/html \ + && mkdir -p /opt/startup -RUN { \ - echo 'error_log=/var/log/apache2/php-error.log'; \ - echo 'display_errors=Off'; \ - echo 'log_errors=On'; \ - echo 'display_startup_errors=Off'; \ - echo 'date.timezone=UTC'; \ - } > /usr/local/etc/php/conf.d/php.ini +# configure startup +COPY sshd_config /etc/ssh/ +COPY ssh_setup.sh /tmp +RUN mkdir -p /opt/startup \ + && chmod -R +x /opt/startup \ + && chmod -R +x /tmp/ssh_setup.sh \ + && (sleep 1;/tmp/ssh_setup.sh 2>&1 > /dev/null) \ + && rm -rf /tmp/* ENV PORT 8080 ENV SSH_PORT 2222 EXPOSE 2222 8080 COPY sshd_config /etc/ssh/ -ENV APACHE_RUN_USER www-data - -# setup default site -RUN mkdir -p /opt/startup -COPY generateStartupCommand.sh /opt/startup/generateStartupCommand.sh -RUN chmod 755 /opt/startup/generateStartupCommand.sh - ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance ENV WEBSITE_INSTANCE_ID localInstance ENV PATH ${PATH}:/home/site/wwwroot -WORKDIR /var/www/html +RUN sed -i 's!ErrorLog ${APACHE_LOG_DIR}/error.log!ErrorLog /dev/stderr!g' /etc/apache2/apache2.conf +RUN sed -i 's!User ${APACHE_RUN_USER}!User www-data!g' /etc/apache2/apache2.conf +RUN sed -i 's!User ${APACHE_RUN_GROUP}!Group www-data!g' /etc/apache2/apache2.conf + +RUN { \ + echo 'DocumentRoot /home/site/wwwroot'; \ + echo 'DirectoryIndex default.htm default.html index.htm index.html index.php hostingstart.html'; \ + echo 'ServerName localhost'; \ + echo 'CustomLog /dev/stdout combined'; \ +} >> /etc/apache2/apache2.conf + +WORKDIR /home/site/wwwroot ENTRYPOINT ["/bin/init_container.sh"] diff --git a/7.3-apache/apache2.conf b/7.3-apache/apache2.conf deleted file mode 100644 index 1b70420d..00000000 --- a/7.3-apache/apache2.conf +++ /dev/null @@ -1,62 +0,0 @@ -# see http://sources.debian.net/src/apache2/2.4.10-1/debian/config-dir/apache2.conf - -Mutex file:/var/lock/apache2 default -PidFile /var/run/apache2/apache2.pid -Timeout 300 -KeepAlive On -MaxKeepAliveRequests 100 -KeepAliveTimeout 5 -User www-data -Group www-data -HostnameLookups Off -ErrorLog /dev/stderr -LogLevel warn - -IncludeOptional mods-enabled/*.load -IncludeOptional mods-enabled/*.conf - -IncludeOptional conf-enabled/*.conf -IncludeOptional sites-enabled/*.conf - -# ports.conf -Listen {PORT} - - - Options FollowSymLinks - AllowOverride None - Require all denied - - - - AllowOverride All - Require all granted - - -DocumentRoot /var/www/html - -AccessFileName .htaccess - - Require all denied - - -LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined -LogFormat "\"%{X-Client-IP}i\" %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined -LogFormat "%h %l %u %t \"%r\" %>s %O" common -LogFormat "%{Referer}i -> %U" referer -LogFormat "%{User-agent}i" agent - -CustomLog /dev/stdout combined - - - SetHandler application/x-httpd-php - - -# Multiple DirectoryIndex directives within the same context will add -# to the list of resources to look for rather than replace -# https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex -DirectoryIndex disabled -DirectoryIndex default.htm default.html index.htm index.html index.php hostingstart.html - -ServerTokens Prod -ServerSignature Off - diff --git a/7.3-apache/generateStartupCommand.sh b/7.3-apache/generateStartupCommand.sh deleted file mode 100644 index fb412641..00000000 --- a/7.3-apache/generateStartupCommand.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -CMDFILE="/opt/startup/startupCommand" -DEFAULT_COMMAND="/usr/sbin/apache2ctl -D FOREGROUND" - -touch "$CMDFILE" - -CUSTOM_STARTUP_COMMAND=`cat $CMDFILE` - -if [ -z "$CUSTOM_STARTUP_COMMAND" ] -then - startupCommand="$DEFAULT_COMMAND" - echo "$startupCommand" >> "$CMDFILE" -fi diff --git a/7.3-apache/init_container.sh b/7.3-apache/init_container.sh index 727a527a..6a9fa7dd 100644 --- a/7.3-apache/init_container.sh +++ b/7.3-apache/init_container.sh @@ -17,16 +17,24 @@ cat /etc/motd # Get environment variables to show up in SSH session eval $(printenv | sed -n "s/^\([^=]\+\)=\(.*\)$/export \1=\2/p" | sed 's/"/\\\"/g' | sed '/=/s//="/' | sed 's/$/"/' >> /etc/profile) +# starting sshd process sed -i "s/SSH_PORT/$SSH_PORT/g" /etc/ssh/sshd_config -service ssh start -sed -i "s/{PORT}/$PORT/g" /etc/apache2/apache2.conf -mkdir /var/lock/apache2 -mkdir /var/run/apache2 +/usr/sbin/sshd -echo "$@" > /opt/startup/startupCommand -/opt/startup/generateStartupCommand.sh -chmod 755 /opt/startup/startupCommand +appPath="/home/site/wwwroot" +runFromPath="/tmp/webapp" +startupCommandPath="/opt/startup/startup.sh" +userStartupCommand="$@" +if [ -z "$userStartupCommand" ] +then + userStartupCommand="apache2-foreground"; +else + userStartupCommand="$userStartupCommand; apache2-foreground;" +fi -STARTUPCOMMAND=$(cat /opt/startup/startupCommand) -echo "Running $STARTUPCOMMAND" -eval "exec $STARTUPCOMMAND" +oryxArgs="-appPath $appPath -output $startupCommandPath \ + -bindPort $PORT -startupCommand '$userStartupCommand'" + +echo "Running oryx $oryxArgs" +eval oryx $oryxArgs +$startupCommandPath diff --git a/7.3-apache/ssh_setup.sh b/7.3-apache/ssh_setup.sh new file mode 100644 index 00000000..8bc40cc2 --- /dev/null +++ b/7.3-apache/ssh_setup.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then + # generate fresh rsa key + ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa +fi + +if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then + # generate fresh dsa key + ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa +fi + +if [ ! -f "/etc/ssh/ssh_host_ecdsa_key" ]; then + # generate fresh ecdsa key + ssh-keygen -f /etc/ssh/ssh_host_ecdsa_key -N '' -t dsa +fi + +if [ ! -f "/etc/ssh/ssh_host_ed25519_key" ]; then + # generate fresh ecdsa key + ssh-keygen -f /etc/ssh/ssh_host_ed25519_key -N '' -t dsa +fi + +#prepare run dir +if [ ! -d "/var/run/sshd" ]; then + mkdir -p /var/run/sshd +fi From 016cac68c061d48c93e63755e61de29db99e3ccb Mon Sep 17 00:00:00 2001 From: blimp Date: Fri, 12 Jul 2019 16:48:56 -0700 Subject: [PATCH 5/8] blimp --- 5.6-apache/Dockerfile | 16 +++++++++++++--- 7.0-apache/Dockerfile | 16 +++++++++++++--- 7.2-apache/Dockerfile | 16 +++++++++++++--- 7.3-apache/Dockerfile | 16 +++++++++++++--- 4 files changed, 52 insertions(+), 12 deletions(-) diff --git a/5.6-apache/Dockerfile b/5.6-apache/Dockerfile index 07ca847a..64ca6aaf 100644 --- a/5.6-apache/Dockerfile +++ b/5.6-apache/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/oryx/php:5.6-20190607.1 +FROM mcr.microsoft.com/oryx/php:5.6-20190708.2 LABEL maintainer="Azure App Services Container Images " ENV PHP_VERSION 5.6 @@ -34,13 +34,23 @@ ENV PATH ${PATH}:/home/site/wwwroot RUN sed -i 's!ErrorLog ${APACHE_LOG_DIR}/error.log!ErrorLog /dev/stderr!g' /etc/apache2/apache2.conf RUN sed -i 's!User ${APACHE_RUN_USER}!User www-data!g' /etc/apache2/apache2.conf RUN sed -i 's!User ${APACHE_RUN_GROUP}!Group www-data!g' /etc/apache2/apache2.conf - RUN { \ echo 'DocumentRoot /home/site/wwwroot'; \ echo 'DirectoryIndex default.htm default.html index.htm index.html index.php hostingstart.html'; \ echo 'ServerName localhost'; \ - echo 'CustomLog /dev/stdout combined'; \ + echo 'CustomLog /dev/stderr combined'; \ } >> /etc/apache2/apache2.conf +RUN rm -f /usr/local/etc/php/conf.d/php.ini \ + && { \ + echo 'error_log=/dev/stderr'; \ + echo 'display_errors=Off'; \ + echo 'log_errors=On'; \ + echo 'display_startup_errors=Off'; \ + echo 'date.timezone=UTC'; \ + echo 'zend_extension=opcache'; \ + } > /usr/local/etc/php/conf.d/php.ini + +RUN rm -f /etc/apache2/conf-enabled/other-vhosts-access-log.conf WORKDIR /home/site/wwwroot diff --git a/7.0-apache/Dockerfile b/7.0-apache/Dockerfile index ec35e422..70351a6d 100644 --- a/7.0-apache/Dockerfile +++ b/7.0-apache/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/oryx/php:7.0-20190607.1 +FROM mcr.microsoft.com/oryx/php:7.0-20190708.2 LABEL maintainer="Azure App Services Container Images " ENV PHP_VERSION 7.0 @@ -34,13 +34,23 @@ ENV PATH ${PATH}:/home/site/wwwroot RUN sed -i 's!ErrorLog ${APACHE_LOG_DIR}/error.log!ErrorLog /dev/stderr!g' /etc/apache2/apache2.conf RUN sed -i 's!User ${APACHE_RUN_USER}!User www-data!g' /etc/apache2/apache2.conf RUN sed -i 's!User ${APACHE_RUN_GROUP}!Group www-data!g' /etc/apache2/apache2.conf - RUN { \ echo 'DocumentRoot /home/site/wwwroot'; \ echo 'DirectoryIndex default.htm default.html index.htm index.html index.php hostingstart.html'; \ echo 'ServerName localhost'; \ - echo 'CustomLog /dev/stdout combined'; \ + echo 'CustomLog /dev/stderr combined'; \ } >> /etc/apache2/apache2.conf +RUN rm -f /usr/local/etc/php/conf.d/php.ini \ + && { \ + echo 'error_log=/dev/stderr'; \ + echo 'display_errors=Off'; \ + echo 'log_errors=On'; \ + echo 'display_startup_errors=Off'; \ + echo 'date.timezone=UTC'; \ + echo 'zend_extension=opcache'; \ + } > /usr/local/etc/php/conf.d/php.ini + +RUN rm -f /etc/apache2/conf-enabled/other-vhosts-access-log.conf WORKDIR /home/site/wwwroot diff --git a/7.2-apache/Dockerfile b/7.2-apache/Dockerfile index 1bc96e4b..39955c7f 100644 --- a/7.2-apache/Dockerfile +++ b/7.2-apache/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/oryx/php:7.2-20190607.1 +FROM mcr.microsoft.com/oryx/php:7.2-20190708.2 LABEL maintainer="Azure App Services Container Images " ENV PHP_VERSION 7.2 @@ -34,13 +34,23 @@ ENV PATH ${PATH}:/home/site/wwwroot RUN sed -i 's!ErrorLog ${APACHE_LOG_DIR}/error.log!ErrorLog /dev/stderr!g' /etc/apache2/apache2.conf RUN sed -i 's!User ${APACHE_RUN_USER}!User www-data!g' /etc/apache2/apache2.conf RUN sed -i 's!User ${APACHE_RUN_GROUP}!Group www-data!g' /etc/apache2/apache2.conf - RUN { \ echo 'DocumentRoot /home/site/wwwroot'; \ echo 'DirectoryIndex default.htm default.html index.htm index.html index.php hostingstart.html'; \ echo 'ServerName localhost'; \ - echo 'CustomLog /dev/stdout combined'; \ + echo 'CustomLog /dev/stderr combined'; \ } >> /etc/apache2/apache2.conf +RUN rm -f /usr/local/etc/php/conf.d/php.ini \ + && { \ + echo 'error_log=/dev/stderr'; \ + echo 'display_errors=Off'; \ + echo 'log_errors=On'; \ + echo 'display_startup_errors=Off'; \ + echo 'date.timezone=UTC'; \ + echo 'zend_extension=opcache'; \ + } > /usr/local/etc/php/conf.d/php.ini + +RUN rm -f /etc/apache2/conf-enabled/other-vhosts-access-log.conf WORKDIR /home/site/wwwroot diff --git a/7.3-apache/Dockerfile b/7.3-apache/Dockerfile index 906e3369..822fc90e 100644 --- a/7.3-apache/Dockerfile +++ b/7.3-apache/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/oryx/php:7.3-20190607.1 +FROM mcr.microsoft.com/oryx/php:7.3-20190708.2 LABEL maintainer="Azure App Services Container Images " ENV PHP_VERSION 7.3 @@ -34,13 +34,23 @@ ENV PATH ${PATH}:/home/site/wwwroot RUN sed -i 's!ErrorLog ${APACHE_LOG_DIR}/error.log!ErrorLog /dev/stderr!g' /etc/apache2/apache2.conf RUN sed -i 's!User ${APACHE_RUN_USER}!User www-data!g' /etc/apache2/apache2.conf RUN sed -i 's!User ${APACHE_RUN_GROUP}!Group www-data!g' /etc/apache2/apache2.conf - RUN { \ echo 'DocumentRoot /home/site/wwwroot'; \ echo 'DirectoryIndex default.htm default.html index.htm index.html index.php hostingstart.html'; \ echo 'ServerName localhost'; \ - echo 'CustomLog /dev/stdout combined'; \ + echo 'CustomLog /dev/stderr combined'; \ } >> /etc/apache2/apache2.conf +RUN rm -f /usr/local/etc/php/conf.d/php.ini \ + && { \ + echo 'error_log=/dev/stderr'; \ + echo 'display_errors=Off'; \ + echo 'log_errors=On'; \ + echo 'display_startup_errors=Off'; \ + echo 'date.timezone=UTC'; \ + echo 'zend_extension=opcache'; \ + } > /usr/local/etc/php/conf.d/php.ini + +RUN rm -f /etc/apache2/conf-enabled/other-vhosts-access-log.conf WORKDIR /home/site/wwwroot From 0400f1a8947dbb2372a3bf4fd4bd665cf8ce4397 Mon Sep 17 00:00:00 2001 From: blimp Date: Mon, 15 Jul 2019 16:16:30 -0700 Subject: [PATCH 6/8] blimp --- 5.6-apache/Dockerfile | 2 +- 7.0-apache/Dockerfile | 2 +- 7.2-apache/Dockerfile | 2 +- 7.3-apache/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/5.6-apache/Dockerfile b/5.6-apache/Dockerfile index 64ca6aaf..d6a0bc97 100644 --- a/5.6-apache/Dockerfile +++ b/5.6-apache/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/oryx/php:5.6-20190708.2 +FROM mcr.microsoft.com/oryx/php:5.6-20190712.5 LABEL maintainer="Azure App Services Container Images " ENV PHP_VERSION 5.6 diff --git a/7.0-apache/Dockerfile b/7.0-apache/Dockerfile index 70351a6d..5a1b156f 100644 --- a/7.0-apache/Dockerfile +++ b/7.0-apache/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/oryx/php:7.0-20190708.2 +FROM mcr.microsoft.com/oryx/php:7.0-20190712.5 LABEL maintainer="Azure App Services Container Images " ENV PHP_VERSION 7.0 diff --git a/7.2-apache/Dockerfile b/7.2-apache/Dockerfile index 39955c7f..99a9eecc 100644 --- a/7.2-apache/Dockerfile +++ b/7.2-apache/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/oryx/php:7.2-20190708.2 +FROM mcr.microsoft.com/oryx/php:7.2-20190712.5 LABEL maintainer="Azure App Services Container Images " ENV PHP_VERSION 7.2 diff --git a/7.3-apache/Dockerfile b/7.3-apache/Dockerfile index 822fc90e..3ff24116 100644 --- a/7.3-apache/Dockerfile +++ b/7.3-apache/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/oryx/php:7.3-20190708.2 +FROM mcr.microsoft.com/oryx/php:7.3-20190712.5 LABEL maintainer="Azure App Services Container Images " ENV PHP_VERSION 7.3 From 21fa279ad3262eaf5e28ebf2fc332d9bdb97ec22 Mon Sep 17 00:00:00 2001 From: blimp Date: Fri, 16 Aug 2019 14:42:27 -0700 Subject: [PATCH 7/8] blimp --- 5.6-apache/Dockerfile | 2 +- 7.0-apache/Dockerfile | 2 +- 7.2-apache/Dockerfile | 2 +- 7.3-apache/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/5.6-apache/Dockerfile b/5.6-apache/Dockerfile index d6a0bc97..234f73c8 100644 --- a/5.6-apache/Dockerfile +++ b/5.6-apache/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/oryx/php:5.6-20190712.5 +FROM mcr.microsoft.com/oryx/php:5.6-20190730.1 LABEL maintainer="Azure App Services Container Images " ENV PHP_VERSION 5.6 diff --git a/7.0-apache/Dockerfile b/7.0-apache/Dockerfile index 5a1b156f..c5080a07 100644 --- a/7.0-apache/Dockerfile +++ b/7.0-apache/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/oryx/php:7.0-20190712.5 +FROM mcr.microsoft.com/oryx/php:7.0-20190730.1 LABEL maintainer="Azure App Services Container Images " ENV PHP_VERSION 7.0 diff --git a/7.2-apache/Dockerfile b/7.2-apache/Dockerfile index 99a9eecc..b682eb1d 100644 --- a/7.2-apache/Dockerfile +++ b/7.2-apache/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/oryx/php:7.2-20190712.5 +FROM mcr.microsoft.com/oryx/php:7.2-20190730.1 LABEL maintainer="Azure App Services Container Images " ENV PHP_VERSION 7.2 diff --git a/7.3-apache/Dockerfile b/7.3-apache/Dockerfile index 3ff24116..fa5b5205 100644 --- a/7.3-apache/Dockerfile +++ b/7.3-apache/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/oryx/php:7.3-20190712.5 +FROM mcr.microsoft.com/oryx/php:7.3-20190730.1 LABEL maintainer="Azure App Services Container Images " ENV PHP_VERSION 7.3 From 26df05d633211d65d06d908de23ca4109acc9c69 Mon Sep 17 00:00:00 2001 From: Patrick Lee <31744877+patricklee2@users.noreply.github.com> Date: Wed, 22 Jan 2020 15:10:09 -0800 Subject: [PATCH 8/8] move xdebug to another repo --- 5.6-apache-xdebug/Dockerfile.template | 8 -------- 5.6-apache-xdebug/Readme.md | 2 -- 7.0-apache-xdebug/Dockerfile.template | 8 -------- 7.0-apache-xdebug/Readme.md | 3 --- 7.2-apache-xdebug/Dockerfile.template | 8 -------- 7.2-apache-xdebug/Readme.md | 3 --- 7.3-apache-xdebug/Dockerfile.template | 8 -------- 7.3-apache-xdebug/Readme.md | 3 --- 8 files changed, 43 deletions(-) delete mode 100644 5.6-apache-xdebug/Dockerfile.template delete mode 100644 5.6-apache-xdebug/Readme.md delete mode 100644 7.0-apache-xdebug/Dockerfile.template delete mode 100644 7.0-apache-xdebug/Readme.md delete mode 100644 7.2-apache-xdebug/Dockerfile.template delete mode 100644 7.2-apache-xdebug/Readme.md delete mode 100644 7.3-apache-xdebug/Dockerfile.template delete mode 100644 7.3-apache-xdebug/Readme.md diff --git a/5.6-apache-xdebug/Dockerfile.template b/5.6-apache-xdebug/Dockerfile.template deleted file mode 100644 index 83d0821d..00000000 --- a/5.6-apache-xdebug/Dockerfile.template +++ /dev/null @@ -1,8 +0,0 @@ -FROM reponame/php:5.6-apache_buildnumber -MAINTAINER Azure App Services Container Images - -RUN yes | pecl install xdebug-2.5.5 \ - && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \ - && echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \ - && echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/xdebug.ini \ - && echo "xdebug.profiler_output_dir=/home/LogFiles" >> /usr/local/etc/php/conf.d/xdebug.ini \ diff --git a/5.6-apache-xdebug/Readme.md b/5.6-apache-xdebug/Readme.md deleted file mode 100644 index 41424a80..00000000 --- a/5.6-apache-xdebug/Readme.md +++ /dev/null @@ -1,2 +0,0 @@ -# Enabling XDebug for PHP containers in Azure App Service -To use the xdebug version of the PHP container in Azure App Service, set an appsetting called PHP_ZENDEXTENSIONS with the value xdebug. diff --git a/7.0-apache-xdebug/Dockerfile.template b/7.0-apache-xdebug/Dockerfile.template deleted file mode 100644 index 650385a1..00000000 --- a/7.0-apache-xdebug/Dockerfile.template +++ /dev/null @@ -1,8 +0,0 @@ -FROM reponame/php:7.0-apache_buildnumber -MAINTAINER Azure App Services Container Images - -RUN yes | pecl install xdebug \ - && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \ - && echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \ - && echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/xdebug.ini \ - && echo "xdebug.profiler_output_dir=/home/LogFiles" >> /usr/local/etc/php/conf.d/xdebug.ini \ diff --git a/7.0-apache-xdebug/Readme.md b/7.0-apache-xdebug/Readme.md deleted file mode 100644 index 1caf070c..00000000 --- a/7.0-apache-xdebug/Readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# Enabling XDebug for PHP containers in Azure App Service - -To use the xdebug version of the PHP container in Azure App Service, set an appsetting called PHP_ZENDEXTENSIONS with the value xdebug. diff --git a/7.2-apache-xdebug/Dockerfile.template b/7.2-apache-xdebug/Dockerfile.template deleted file mode 100644 index 6d04535e..00000000 --- a/7.2-apache-xdebug/Dockerfile.template +++ /dev/null @@ -1,8 +0,0 @@ -FROM reponame/php:7.2-apache_buildnumber -MAINTAINER Azure App Services Container Images - -RUN yes | pecl install xdebug-beta \ - && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \ - && echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \ - && echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/xdebug.ini \ - && echo "xdebug.profiler_output_dir=/home/LogFiles" >> /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file diff --git a/7.2-apache-xdebug/Readme.md b/7.2-apache-xdebug/Readme.md deleted file mode 100644 index 1caf070c..00000000 --- a/7.2-apache-xdebug/Readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# Enabling XDebug for PHP containers in Azure App Service - -To use the xdebug version of the PHP container in Azure App Service, set an appsetting called PHP_ZENDEXTENSIONS with the value xdebug. diff --git a/7.3-apache-xdebug/Dockerfile.template b/7.3-apache-xdebug/Dockerfile.template deleted file mode 100644 index 18f9c080..00000000 --- a/7.3-apache-xdebug/Dockerfile.template +++ /dev/null @@ -1,8 +0,0 @@ -FROM reponame/php:7.3-apache_buildnumber -MAINTAINER Azure App Services Container Images - -RUN yes | pecl install xdebug-beta \ - && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \ - && echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \ - && echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/xdebug.ini \ - && echo "xdebug.profiler_output_dir=/home/LogFiles" >> /usr/local/etc/php/conf.d/xdebug.ini \ No newline at end of file diff --git a/7.3-apache-xdebug/Readme.md b/7.3-apache-xdebug/Readme.md deleted file mode 100644 index 1caf070c..00000000 --- a/7.3-apache-xdebug/Readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# Enabling XDebug for PHP containers in Azure App Service - -To use the xdebug version of the PHP container in Azure App Service, set an appsetting called PHP_ZENDEXTENSIONS with the value xdebug.