-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix memcached warning for php 5.6 #74
Open
abhijitrakas
wants to merge
5
commits into
EasyEngine:develop
Choose a base branch
from
abhijitrakas:issue/install-memcached-ext
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+124
−1
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
bf316b3
Fix memcached warning for php 5.6
abhijitrakas 1fcab24
Correctly configure GD library
kirtangajjar 4ef8963
Merge branch 'kirtangajjar-fix-gd' into develop
mbtamuli 295ea01
Merge branch 'issue/install-memcached-ext' of https://github.com/abhi…
sagarnasit 88168fa
Add php5.6 lable for php v5.6 image
sagarnasit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
FROM php:5.6-fpm | ||
|
||
LABEL maintainer="Abhijit Rakas <[email protected]>" | ||
LABEL org.label-schema.schema-version="1.0.0-rc1" | ||
LABEL org.label-schema.vendor="EasyEngine" | ||
LABEL org.label-schema.name="php5.6" | ||
|
||
RUN set -ex; \ | ||
apt-get update; \ | ||
apt-get install -y --no-install-recommends \ | ||
imagemagick \ | ||
less \ | ||
libc-client-dev \ | ||
libfreetype6-dev \ | ||
libjpeg-dev \ | ||
libjpeg62-turbo-dev \ | ||
libkrb5-dev \ | ||
libmagickwand-dev \ | ||
libmcrypt-dev \ | ||
libmemcached-dev \ | ||
libxml2-dev \ | ||
libpng-dev \ | ||
libzip-dev \ | ||
mysql-client \ | ||
ssmtp \ | ||
unzip \ | ||
vim \ | ||
zip | ||
|
||
RUN pecl install imagick memcached-2.2.0; \ | ||
printf "\n" | pecl install mcrypt-1.0.1; \ | ||
printf "\n" | pecl install redis; \ | ||
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \ | ||
docker-php-ext-configure zip --with-libzip; \ | ||
docker-php-ext-configure --with-php-config=/usr/local/bin/php-config; \ | ||
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \ | ||
docker-php-ext-install gd imap mysqli opcache soap zip; \ | ||
docker-php-ext-enable imagick mcrypt redis; \ | ||
echo "extension=memcached.so" >> /usr/local/etc/php/conf.d/memcached.ini; \ | ||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ | ||
rm -rf /var/lib/apt/lists/*; | ||
|
||
RUN mkdir -p /usr/src/php/ext; \ | ||
cd /usr/src/php/ext/; \ | ||
curl -sSL -o php7.zip https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.zip; \ | ||
unzip php7.zip; \ | ||
mv pecl-memcache-NON_BLOCKING_IO_php7 memcache; \ | ||
rm -rf /tmp/pecl-memcache-php7 /usr/src/php/ext/php7.zip; \ | ||
docker-php-ext-configure memcache --with-php-config=/usr/local/bin/php-config; \ | ||
docker-php-ext-install memcache; | ||
|
||
# set recommended PHP.ini settings | ||
# see https://secure.php.net/manual/en/opcache.installation.php | ||
RUN { \ | ||
echo 'opcache.memory_consumption=128'; \ | ||
echo 'opcache.interned_strings_buffer=8'; \ | ||
echo 'opcache.max_accelerated_files=4000'; \ | ||
echo 'opcache.revalidate_freq=2'; \ | ||
echo 'opcache.fast_shutdown=1'; \ | ||
echo 'opcache.enable_cli=1'; \ | ||
} > /usr/local/etc/php/conf.d/opcache-recommended.ini | ||
|
||
# Donwload and install composer | ||
RUN curl -sSL "https://getcomposer.org/installer" | php \ | ||
&& mv composer.phar /usr/local/bin/composer | ||
|
||
# Install wp-cli | ||
RUN curl -O "https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar" \ | ||
&& chmod +x wp-cli.phar \ | ||
&& mv wp-cli.phar /usr/local/bin/wp | ||
|
||
# Setup a config file | ||
RUN mkdir -p /etc/wp-cli | ||
RUN { \ | ||
echo 'path: /var/www/htdocs'; \ | ||
} > /etc/wp-cli/config.yml | ||
|
||
RUN echo "mailhub=postfix\nUseTLS=NO\nFromLineOverride=YES" > /etc/ssmtp/ssmtp.conf | ||
|
||
# Setup logs | ||
RUN mkdir -p /var/log/php; \ | ||
chown -R www-data: /var/log/php; \ | ||
rm /usr/local/etc/php-fpm.d/*; \ | ||
mv /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini | ||
COPY easyengine.conf /usr/local/etc/php-fpm.d/easyengine.conf | ||
|
||
COPY expose_off.ini /usr/local/etc/php/conf.d/expose_off.ini | ||
COPY bashrc /root/.bashrc | ||
COPY bashrc /var/www/.bashrc | ||
COPY docker-entrypoint.sh /usr/local/bin/ | ||
|
||
WORKDIR /var/www/htdocs | ||
USER www-data | ||
|
||
ENTRYPOINT ["docker-entrypoint.sh"] | ||
CMD ["php-fpm"] |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
PS1="\`if [ \$? = 0 ]; then echo \[\e[37m\]^_^[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; else echo \[\e[31m\]O_O[\u@$VIRTUAL_HOST:\w]\\$ \[\e[0m\]; fi\`" | ||
export HISTTIMEFORMAT="%d/%m/%y %T " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[global] | ||
error_log = /var/log/php/error.log | ||
daemonize = no | ||
|
||
[www] | ||
ping.path = /ee-admin/ping | ||
pm.status_path = /ee-admin/status | ||
request_terminate_timeout = 300 | ||
user = www-data | ||
group = www-data | ||
pm = ondemand | ||
pm.max_children = 20 | ||
listen = 9000 | ||
; if we send this to /proc/self/fd/1, it never appears | ||
access.log = /var/log/php/access.log | ||
|
||
clear_env = no | ||
|
||
; Ensure worker stdout and stderr are sent to the main error log. | ||
catch_workers_output = yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
expose_php = Off |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the correct version of memcache that we're using? The URL itself contains
php7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mbtamuli URL contains
php7
because ofbranch
name. No official words inreadme
about php5.6 support but repo contains code for both PHP version5
and7
though need to test once.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sagarnasit Did you get a chance to test this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sagarnasit Please add yourself also as maintainer.